Plugin Directory

Changeset 3420797


Ignore:
Timestamp:
12/16/2025 09:24:46 AM (4 months ago)
Author:
systemsrtk
Message:

v1.0.3

Location:
r2k-captcha
Files:
12 added
2 edited

Legend:

Unmodified
Added
Removed
  • r2k-captcha/trunk/r2k-captcha.php

    r3401587 r3420797  
    44 * Plugin URI: https://wordpress.org/support/plugin/r2k-security-captcha
    55 * Description: Protect your WordPress website from spam and abuse with R2K Security Captcha. This plugin offers powerful security by integrating with two of the most trusted services: Google's reCAPTCHA Enterprise and Cloudflare's Turnstile. Choose the best protection for your site and keep your forms secure.
    6  * Version: 1.0.2
     6 * Version: 1.0.3
    77 * Requires at least: 6.0
    88 * Requires PHP: 8.0
     
    1919    $plugin_data = get_plugin_data( __FILE__ );
    2020
    21     define('R2K_CAPTCHA_VERSION', '1.0.2');
     21    define('R2K_CAPTCHA_VERSION', '1.0.3');
    2222    define('R2K_CAPTCHA_PLGUIN_NAME', $plugin_data['Name']);
    2323
     
    190190                // login
    191191                if ($this->get_option('r2k_captcha_login')) {
    192                     if (is_login() && (!$this->hasGetValue('action') || !in_array(wp_kses_data($_GET['action']), ['lostpassword', 'rp', 'resetpass', 'register'])) ) {
     192                    if ($this->is_login() && (!$this->hasGetValue('action') || !in_array(wp_kses_data($_GET['action']), ['lostpassword', 'rp', 'resetpass', 'register'])) ) {
    193193                        add_action('login_enqueue_scripts', [$this, 'enqueue_front'] );
    194194                        add_action('login_form', [$this, 'frontend_field'] );
     
    199199                // lost password
    200200                if ($this->get_option('r2k_captcha_lostpassword')) {
    201                     if(is_login() && $this->hasGetValue('action') &&  in_array(wp_kses_data($_GET['action']), ['lostpassword', 'rp', 'resetpass'])) {
     201                    if($this->is_login() && $this->hasGetValue('action') &&  in_array(wp_kses_data($_GET['action']), ['lostpassword', 'rp', 'resetpass'])) {
    202202                        add_action('login_enqueue_scripts', [$this, 'enqueue_front'] );
    203203                        add_action('resetpass_form', [$this, 'frontend_field'] );
     
    210210                // registration
    211211                if ($this->get_option('r2k_captcha_register')) {
    212                     if(is_login() && $this->hasGetValue('action') &&  in_array(wp_kses_data($_GET['action']), ['register'])) {
     212                    if($this->is_login() && $this->hasGetValue('action') &&  in_array(wp_kses_data($_GET['action']), ['register'])) {
    213213                        add_action('login_enqueue_scripts', [$this, 'enqueue_front'] );
    214214                        add_action('register_form', [$this, 'frontend_field'] );
     
    247247            return self::$instance;
    248248        }
     249
     250
     251        private function is_login() {
     252            return is_login() || strpos(basename(wp_login_url()), basename($_SERVER['SCRIPT_NAME'])) !== false;
     253        }
     254
    249255
    250256        /*
     
    290296
    291297                $action = 'login';
    292               if (is_login() && $this->hasGetValue('action')) {
     298              if ($this->is_login() && $this->hasGetValue('action')) {
    293299                if (in_array(wp_kses_data($_GET['action']), ['rp', 'resetpass'])) {
    294300                    $action = 'resetpass';
  • r2k-captcha/trunk/readme.txt

    r3401587 r3420797  
    55Requires at least: 6.0
    66Tested up to: 6.8
    7 Stable tag: 1.0.2
     7Stable tag: 1.0.3
    88Requires PHP: 8.0
    99License: GPLv2 or later
     
    5555
    5656== Changelog ==
     57= 1.0.3 =
     58* Missing scripts on login in case of Subfolder wordpress
     59
    5760= 1.0.2 =
    5861* Fix Javascript error
Note: See TracChangeset for help on using the changeset viewer.