Changeset 973415
- Timestamp:
- 08/26/2014 04:34:49 PM (11 years ago)
- Location:
- agreeable/trunk
- Files:
-
- 2 edited
-
agreeable.php (modified) (7 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
agreeable/trunk/agreeable.php
r970082 r973415 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. Based on the I-Agree plugin by Michael Stursberg. 6 Version: 1.3. 26 Version: 1.3.3 7 7 Author: kraftpress 8 8 Author URI: http://kraftpress.it … … 30 30 31 31 /* Initialize the plugin */ 32 add_action('init', array($this, ' ag_language_init'));32 add_action('init', array($this, 'init')); 33 33 add_action('admin_enqueue_scripts', array($this, 'ag_admin')); 34 34 add_action('wp_enqueue_scripts', array($this, 'ag_front')); … … 58 58 add_action('tml_register_form', array($this, 'ag_register_terms_accept'), 10, 3); 59 59 add_action('bp_after_login_widget_loggedout', array($this, 'ag_widget_terms_accept')); 60 61 if (is_multisite()) {62 add_action( 'signup_extra_fields', 'ag_register_terms_accept', 10, 3);63 add_action( 'signup_blogform', 'ag_register_terms_accept', 10, 3);64 }65 60 66 61 $this->options = array( … … 94 89 } 95 90 96 function ag_language_init() {91 function init() { 97 92 // Localization 98 93 load_plugin_textdomain('agreeable', false, basename( dirname( __FILE__ ) ) . '/languages' ); 94 95 if (is_multisite()) { 96 add_action( 'signup_extra_fields', array($this, 'ag_register_terms_accept'), 10, 3); 97 add_action( 'signup_blogform', array($this, 'ag_register_terms_accept'), 10, 3); 98 } 99 99 } 100 100 101 101 function ag_admin() { 102 102 103 /* Plugin Stylesheet */ 103 104 wp_enqueue_style( 'agreeable-css', plugins_url('css/admin.css', __FILE__), '', '0.3.4', 'screen'); 105 104 106 } 105 107 106 108 function ag_front() { 109 107 110 /* Only load lightbox code on the frontend, where we need it */ 108 111 if ( $this->is_login_page() ) { 109 112 wp_enqueue_script('jquery'); 110 113 } 114 111 115 wp_enqueue_script( 'magnific', plugins_url('js/magnific.js', __FILE__),'', '', true); 112 116 wp_enqueue_script( 'agreeable-js', plugins_url('js/agreeable.js', __FILE__), '', '', true); 113 117 wp_enqueue_style( 'magnific', plugins_url('css/magnific.css', __FILE__)); 114 118 wp_enqueue_style( 'agreeable-css', plugins_url('css/front.css', __FILE__)); 119 115 120 } 116 121 … … 160 165 161 166 if(is_multisite()) { 162 167 168 $result = $user; 163 169 $result['errors'] = $errors; 164 $result['errors']->add('ag_did_not_accept', $this->options['fail_text']); 165 170 166 171 return $result; 167 172 … … 268 273 $errors = new WP_Error(); 269 274 270 if(isset($_SESSION['ag_errors']) && $errors->get_error_message( 'ag_did_not_accept' ) != '' ) {275 if(isset($_SESSION['ag_errors']) && $errors->get_error_message( 'ag_did_not_accept' ) == '' ) { 271 276 272 277 $error = $_SESSION['ag_errors']; … … 323 328 if($this->options['register'] == 1) { 324 329 $this->ag_display_terms_form('register', $errors); 325 } 326 327 echo '<script>'; 328 echo ' 329 jQuery(document).ready(function($){ 330 if($("#theme-my-login")) { 331 $("#theme-my-login #terms-accept").insertBefore("#theme-my-login .submit"); 332 } 333 }); 334 '; 335 echo '</script>'; 336 330 331 echo '<script>'; 332 echo ' 333 jQuery(document).ready(function($){ 334 if($("#theme-my-login")) { 335 $("#theme-my-login #terms-accept").insertBefore("#theme-my-login .submit"); 336 } 337 }); 338 '; 339 echo '</script>'; 340 341 } 342 return; 337 343 } 338 344 -
agreeable/trunk/readme.txt
r969031 r973415 9 9 10 10 == Description == 11 Add an "agree to terms" check box to your login and/or registration pages, requiring users to agree prior to logging in or registering. Tested with BuddyPress. Based on the I-Agree plugin by thesturs.11 Add an "agree to terms" check box to your login, registration, or comment forms, requiring users to agree. Tested with BuddyPress and Multisite. Based on the I-Agree plugin by thesturs. 12 12 13 13 Use the form in the plugin settings page to contact us with feature requests, comments, or concerns. 14 14 15 = New! =16 * Lightbox is now RESPONSIVE! And prettier :)17 * Customize your lightbox background and text colors18 * Disable the lightbox if you want19 * Add the checkbox to your comment forms now too!20 21 15 = Features = 22 16 * Select your terms page from a dropdown 23 * Terms open in a lightbox or new tab17 * Terms open in a responsive lightbox or new tab 24 18 * Tested with WP, BuddyPress, and bbPress login widgets 25 19 * Customizable text and error message 20 21 = Extensions = 22 * [Agreeable Records] (http://kraftpress.it/downloads/agreeable-records/, "Agreeable Records Premium Plugin Extension") allows you to track user agreement by IP and username each time they log in. 26 23 27 24 = Translations = … … 41 38 42 39 == Changelog == 40 41 = 1.3.3 = 42 * Misc Multisite and BuddyPress bug fixes 43 43 44 44 = 1.3 =
Note: See TracChangeset
for help on using the changeset viewer.