Changeset 1202456
- Timestamp:
- 07/20/2015 05:13:53 PM (11 years ago)
- File:
-
- 1 edited
-
agreeable/trunk/agreeable.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
agreeable/trunk/agreeable.php
r1145121 r1202456 4 4 Plugin URI: http://wordpress.org/extend/plugins/agreeable 5 5 Description: Add a required "Agree to terms" checkbox to login and/or register forms. 6 Version: 1. 3.9.66 Version: 1.4 7 7 Author: kraftpress 8 8 Author URI: http://kraftpress.it … … 49 49 add_filter('register_form', array($this, 'ag_register_terms_accept')); 50 50 add_filter('comment_form_after_fields', array($this, 'ag_comment_terms_accept')); 51 add_filter('comment_form_logged_in_after', array($this, 'ag_comment_terms_accept')); 51 52 add_action('bp_before_registration_submit_buttons', array($this, 'ag_register_terms_accept')); 52 53 add_action('tml_register_form', array($this, 'ag_register_terms_accept'), 10, 3); … … 179 180 return $user; 180 181 181 182 182 } else { 183 183 … … 263 263 // See if the checkbox #ag_login_accept was checked 264 264 if ( isset( $_REQUEST['ag_login_accept'] ) && $_REQUEST['ag_login_accept'] == 1 ) { 265 265 266 // Checkbox on, allow comment 266 //do_action('agreeable_validate_user', $user, $_REQUEST['ag_type']); 267 // Grab info from the form 268 269 global $current_user; 270 271 if(is_user_logged_in()) { 272 $user = $current_user->ID; 273 } else { 274 $user = array('author' => $_REQUEST['author'], 'email' => $_REQUEST['email']); 275 } 276 277 do_action('agreeable_validate_user', $user, $_REQUEST['ag_type']); 267 278 return $comment; 279 268 280 } else { 269 281 // Did NOT check the box, do not allow comment
Note: See TracChangeset
for help on using the changeset viewer.