Plugin Directory

Changeset 776128


Ignore:
Timestamp:
09/20/2013 06:24:37 PM (13 years ago)
Author:
mpvanwinkle77
Message:

Version 2.2.4: see changelog

Location:
simplr-registration-form/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • simplr-registration-form/trunk/lib/mod.php

    r710995 r776128  
    2626if(!function_exists('simplr_inactive_query')):
    2727    function simplr_inactive_query( &$query ) {
    28         if($_GET['view_inactive'] === 'true') {
     28        if(@$_GET['view_inactive'] === 'true') {
    2929            $query->query_where = $query->query_where.' AND user_status = 2';
    3030        }
  • simplr-registration-form/trunk/readme.txt

    r725851 r776128  
    55Requires at least: 3.0
    66Tested up to: 3.6
    7 Stable tag: 2.2.3
     7Stable tag: 2.2.4
    88
    99This plugin allows users to easily add a custom user registration form anywhere on their site using simple shortcode.
     
    144144-Fix moderation login bug
    145145-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  
    22
    33function simplr_validate($data,$atts) {
     4
     5    global $wp_version;
    46   
    57    //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    }
    812   
    913    //empty errors array
     
    1519   
    1620    //recaptcha check/
    17     if($options->recap_on == 'yes') {
     21    if( isset($options->recap_on) AND $options->recap_on == 'yes') {
    1822        $spam = recaptcha_check($data);
    1923        if($spam != false) {
     
    399403    //filter for adding profile fields
    400404    $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') {
    402406        $form .= sreg_recaptcha_field();
    403407    }
     
    425429    $form .=  '</form>';
    426430    $form .=  '</div>';
    427     if($soptions->fb_connect_on == 'yes') {
     431    if( isset($options->fb_connect_on) AND $soptions->fb_connect_on == 'yes') {
    428432        $form .= sreg_load_fb_script();
    429433    }
     
    433437
    434438function sreg_basic($atts) {
     439    require_once __DIR__.'/lib/sreg.class.php';
    435440    //Check if the user is logged in, if so he doesn't need the registration page
    436441    if ( is_user_logged_in() AND !current_user_can('administrator') ) {
     
    447452        //Then check to see whether a form has been submitted, if so, I deal with it.
    448453        global $sreg;
     454        if( !is_object($sreg) ) $sreg = new Sreg_Submit();
     455        $out = '';
    449456        if(isset($sreg->success)) {
    450457            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);
    462466
    463467    } //Close LOGIN Conditional
     
    533537function sreg_fb_connect() {
    534538    $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') {
    536540        return null;
    537541    } else {
  • simplr-registration-form/trunk/simplr_reg_page.php

    r725851 r776128  
    22/*
    33Plugin Name: Simplr User Registration Form Plus
    4 Version: 2.2.3
     4Version: 2.2.4
    55Description: This a simple plugin for adding a custom user registration form to any post or page using shortcode.
    66Author: Mike Van Winkle
     
    161161    if(is_admin())
    162162    {
    163         if(@$_GET['page'] == 'simplr_reg_set' ) {
     163        if( isset($_GET['page']) AND $_GET['page'] == 'simplr_reg_set' ) {
    164164            wp_register_style('chosen',SIMPLR_URL.'/assets/js/chosen/chosen/chosen.css');
    165165            wp_register_script('chosen',SIMPLR_URL.'/assets/js/chosen/chosen/chosen.jquery.js',array('jquery'));
     
    326326    //require_once(SIMPLR_DIR.'/lib/login.php');
    327327    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')) {   
    329332        require_once(SIMPLR_DIR .'/lib/facebook.php');
    330333        include_once(SIMPLR_DIR .'/lib/fb.class.php'); 
     
    425428function get_fb_login_btn($content) {
    426429    $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') {
    428431        $out = '';
    429432        require_once(SIMPLR_DIR .'/lib/facebook.php');
     
    436439        echo $out;
    437440    }
     441    return $content;
    438442}
    439443
     
    594598        set_transient('login_post_data',$post);
    595599    }
    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 != '' ) {
    597601        wp_redirect(get_permalink($simplr_options->register_redirect));
    598602    } elseif(end($path) == 'profile.php' AND $simplr_options->profile_redirect != '') {
  • simplr-registration-form/trunk/views/fields.php

    r710995 r776128  
    4949}
    5050
    51 if($_GET['action'] == 'edit' OR $_GET['action'] == 'add') {
     51if(@$_GET['action'] == 'edit' OR @$_GET['action'] == 'add') {
    5252    if($_GET['action'] == 'edit') {
    5353        $field = new SREG_Fields();
Note: See TracChangeset for help on using the changeset viewer.