Changeset 776128
- Timestamp:
- 09/20/2013 06:24:37 PM (13 years ago)
- Location:
- simplr-registration-form/trunk
- Files:
-
- 5 edited
-
lib/mod.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
simplr_form_functions.php (modified) (7 diffs)
-
simplr_reg_page.php (modified) (6 diffs)
-
views/fields.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
simplr-registration-form/trunk/lib/mod.php
r710995 r776128 26 26 if(!function_exists('simplr_inactive_query')): 27 27 function simplr_inactive_query( &$query ) { 28 if( $_GET['view_inactive'] === 'true') {28 if(@$_GET['view_inactive'] === 'true') { 29 29 $query->query_where = $query->query_where.' AND user_status = 2'; 30 30 } -
simplr-registration-form/trunk/readme.txt
r725851 r776128 5 5 Requires at least: 3.0 6 6 Tested up to: 3.6 7 Stable tag: 2.2. 37 Stable tag: 2.2.4 8 8 9 9 This plugin allows users to easily add a custom user registration form anywhere on their site using simple shortcode. … … 144 144 -Fix moderation login bug 145 145 -Add 'simplr_activated_user' action 146 147 = 2.2.4 = 148 -Fix "undefined" notices 149 -Fix incompatibility with login_message filter -
simplr-registration-form/trunk/simplr_form_functions.php
r710995 r776128 2 2 3 3 function simplr_validate($data,$atts) { 4 5 global $wp_version; 4 6 5 7 //incluce necessary files, not required for WP3.1+ 6 require_once(ABSPATH . WPINC . '/registration.php' ); 7 require_once(ABSPATH . WPINC . '/pluggable.php' ); 8 if( version_compare( $wp_version, "3.1", "<") ) { 9 require_once(ABSPATH . WPINC . '/registration.php' ); 10 require_once(ABSPATH . WPINC . '/pluggable.php' ); 11 } 8 12 9 13 //empty errors array … … 15 19 16 20 //recaptcha check/ 17 if( $options->recap_on == 'yes') {21 if( isset($options->recap_on) AND $options->recap_on == 'yes') { 18 22 $spam = recaptcha_check($data); 19 23 if($spam != false) { … … 399 403 //filter for adding profile fields 400 404 $form = apply_filters('simplr_add_form_fields', $form); 401 if( $soptions->recap_on == 'yes') {405 if( isset( $soptions->recap_on ) AND $soptions->recap_on == 'yes') { 402 406 $form .= sreg_recaptcha_field(); 403 407 } … … 425 429 $form .= '</form>'; 426 430 $form .= '</div>'; 427 if( $soptions->fb_connect_on == 'yes') {431 if( isset($options->fb_connect_on) AND $soptions->fb_connect_on == 'yes') { 428 432 $form .= sreg_load_fb_script(); 429 433 } … … 433 437 434 438 function sreg_basic($atts) { 439 require_once __DIR__.'/lib/sreg.class.php'; 435 440 //Check if the user is logged in, if so he doesn't need the registration page 436 441 if ( is_user_logged_in() AND !current_user_can('administrator') ) { … … 447 452 //Then check to see whether a form has been submitted, if so, I deal with it. 448 453 global $sreg; 454 if( !is_object($sreg) ) $sreg = new Sreg_Submit(); 455 $out = ''; 449 456 if(isset($sreg->success)) { 450 457 return $sreg->output; 451 } else { 452 if(is_array($sreg->errors)) { 453 $out = ''; 454 foreach($sreg->errors as $mes) { 455 $out .= '<div class="simplr-message error">'.$mes .'</div>'; 456 } 457 } elseif(is_string($sreg->errors)) { 458 $out = '<div class="simplr-message error">'.$message .'</div>'; 459 } 460 return $out.simplr_build_form($_POST,$atts); 461 } 458 } elseif( isset($sreg->errors) AND is_array($sreg->errors)) { 459 foreach($sreg->errors as $mes) { 460 $out .= '<div class="simplr-message error">'.$mes .'</div>'; 461 } 462 } elseif(is_string($sreg->errors)) { 463 $out = '<div class="simplr-message error">'.$message .'</div>'; 464 } 465 return $out.simplr_build_form($_POST,$atts); 462 466 463 467 } //Close LOGIN Conditional … … 533 537 function sreg_fb_connect() { 534 538 $options = get_option('simplr_reg_options'); 535 if( $options->fb_connect_on != 'yes') {539 if( !isset($options->fb_connect_on) OR $options->fb_connect_on != 'yes') { 536 540 return null; 537 541 } else { -
simplr-registration-form/trunk/simplr_reg_page.php
r725851 r776128 2 2 /* 3 3 Plugin Name: Simplr User Registration Form Plus 4 Version: 2.2. 34 Version: 2.2.4 5 5 Description: This a simple plugin for adding a custom user registration form to any post or page using shortcode. 6 6 Author: Mike Van Winkle … … 161 161 if(is_admin()) 162 162 { 163 if( @$_GET['page'] == 'simplr_reg_set' ) {163 if( isset($_GET['page']) AND $_GET['page'] == 'simplr_reg_set' ) { 164 164 wp_register_style('chosen',SIMPLR_URL.'/assets/js/chosen/chosen/chosen.css'); 165 165 wp_register_script('chosen',SIMPLR_URL.'/assets/js/chosen/chosen/chosen.jquery.js',array('jquery')); … … 326 326 //require_once(SIMPLR_DIR.'/lib/login.php'); 327 327 global $facebook; 328 if($simplr_options->fb_connect_on == 'yes' AND !is_user_logged_in() AND !current_user_can('administrator')) { 328 if( isset($simplr_options->fb_connect_on) 329 AND $simplr_options->fb_connect_on == 'yes' 330 AND !is_user_logged_in() 331 AND !current_user_can('administrator')) { 329 332 require_once(SIMPLR_DIR .'/lib/facebook.php'); 330 333 include_once(SIMPLR_DIR .'/lib/fb.class.php'); … … 425 428 function get_fb_login_btn($content) { 426 429 $option = get_option('simplr_reg_options'); 427 if( $option->fb_connect_on == 'yes') {430 if( isset($option->fb_connect_on) AND $option->fb_connect_on == 'yes') { 428 431 $out = ''; 429 432 require_once(SIMPLR_DIR .'/lib/facebook.php'); … … 436 439 echo $out; 437 440 } 441 return $content; 438 442 } 439 443 … … 594 598 set_transient('login_post_data',$post); 595 599 } 596 if( ((end($path) == 'wp-login.php' AND $_GET['action']== 'register') OR (end($path) == 'wp-signup.php')) AND $simplr_options->register_redirect != '' ) {600 if( ((end($path) == 'wp-login.php' AND @$_GET['action'] == 'register') OR (end($path) == 'wp-signup.php')) AND $simplr_options->register_redirect != '' ) { 597 601 wp_redirect(get_permalink($simplr_options->register_redirect)); 598 602 } elseif(end($path) == 'profile.php' AND $simplr_options->profile_redirect != '') { -
simplr-registration-form/trunk/views/fields.php
r710995 r776128 49 49 } 50 50 51 if( $_GET['action'] == 'edit' OR$_GET['action'] == 'add') {51 if(@$_GET['action'] == 'edit' OR @$_GET['action'] == 'add') { 52 52 if($_GET['action'] == 'edit') { 53 53 $field = new SREG_Fields();
Note: See TracChangeset
for help on using the changeset viewer.