Plugin Directory

Changeset 2911495


Ignore:
Timestamp:
05/12/2023 08:07:03 AM (22 months ago)
Author:
rafasashi
Message:

1.0.10

Location:
svg-captcha/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • svg-captcha/trunk/includes/class-svg-captcha.php

    r2877676 r2911495  
    217217        add_action('wp_ajax_svgc_captcha_reload', array($this, 'svgc_captcha_reload'));
    218218       
     219        add_action('svgc_render_form_input', array($this,'svgc_render_form_input'),9999);
     220       
     221        add_action('svgc_validate_register_captcha', array($this,'svgc_validate_register_captcha'),9999,3);
     222       
    219223        add_filter('svgc_location_enable_captcha_on_register',function(){
    220224           
    221225            // Add custom captcha field to login form
    222226           
    223             add_action('register_form', array($this, 'svgc_render_form_input'),9999);
    224      
    225             add_action('registration_errors', array($this, 'svgc_validate_register_captcha'),10,3);
     227            add_action('register_form', array($this,'svgc_render_form_input'),9999);
     228           
     229            add_action('registration_errors', array($this,'svgc_validate_register_captcha'),10,3);
    226230        });
    227231       
     
    231235           
    232236            add_action('login_form', array($this, 'svgc_login_form'),10,1); // using default page
    233            
     237
    234238            add_action('login_form_middle', array($this, 'svgc_login_form'),10,2); // using wp_login_form
    235239           
     
    242246           
    243247            add_filter('comment_form_field_comment', array($this, 'svgc_form_input')); // Add a filter to verify if the captcha in the comment section was correct.
     248           
    244249            add_filter('preprocess_comment', array($this, 'svgc_validate_form_captcha'));
    245250        });
     
    470475            if( empty($_POST['svgc_answer']) || !is_array($_POST['svgc_answer']) ) {
    471476               
    472                 $errors->add('invalid_captcha', __( '<strong>ERROR</strong>: You need to enter a captcha', 'svg-captcha' ) );
     477                $errors->add('invalid_captcha', __( 'You need to enter a captcha', 'svg-captcha' ) );
    473478            }
    474479            else {
     
    478483                if( !$this->svgc_check($answer) ) {
    479484                   
    480                     $errors->add('invalid_captcha', __( '<strong>ERROR</strong>: Invalid captcha, try again', 'svg-captcha' ) );
     485                    $errors->add('invalid_captcha', __( 'Invalid captcha, try again', 'svg-captcha' ) );
    481486                }
    482487            }
  • svg-captcha/trunk/readme.txt

    r2893492 r2911495  
    88Requires WP: 6.1.1
    99Requires PHP: 6.0
    10 Stable Tag: 1.0.9
     10Stable Tag: 1.0.10
    1111Tested up to: 6.2
    1212
  • svg-captcha/trunk/svg-captcha.php

    r2893492 r2911495  
    33 * Plugin Name: SVG Captcha
    44 * Plugin URI: https://code.recuweb.com/get/svg-captcha/
    5  * Version: 1.0.9
     5 * Version: 1.0.10
    66 * Description: Validate your forms with a self hosted SVG Captcha.
    77 * Author: rafasashi
Note: See TracChangeset for help on using the changeset viewer.