Plugin Directory

Changeset 3252815


Ignore:
Timestamp:
03/09/2025 10:59:20 AM (12 months ago)
Author:
newwaypmsco
Message:

Version 1.1.1 changes:

  • Added full compatibility with Wordfence and Two-Factor Authentication (2FA).
  • Facial recognition now runs before 2FA, followed by the 2FA form if enabled.
  • Updated readme.txt to version 1.1.1 with new details in Changelog and FAQ.
Location:
facial-recognition-authentication/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • facial-recognition-authentication/trunk/assets/js/main2.js

    r3252297 r3252815  
    6363
    6464        $('#accountForm').on('submit', manage_account);
     65
     66        // چک کردن 2FA و اجرای تشخیص چهره قبل از اون
     67        if (pluginData.is_wordfence_2fa_active === 'true') {
     68            console.log('Wordfence 2FA فعاله، ولی تشخیص چهره اول اجرا می‌شه');
     69            // مخفی کردن فرم 2FA تا تشخیص چهره تموم شه
     70            setTimeout(() => {
     71                if ($('.wf-form-2fa').length) {
     72                    $('.wf-form-2fa').hide();
     73                }
     74            }, 500);
     75        }
    6576    });
    6677
     
    148159                        icon: 'success',
    149160                        timer: 2000
    150                     }).then(() => refresh_page());
     161                    }).then(() => {
     162                        if (pluginData.is_wordfence_2fa_active === 'true') {
     163                            // اگه 2FA فعال بود، فرم Wordfence رو نشون بده
     164                            $('.wf-form-2fa').show();
     165                            console.log('تشخیص چهره تموم شد، حالا 2FA اجرا می‌شه');
     166                        } else {
     167                            refresh_page(); // اگه 2FA نبود، مستقیم رفرش کن
     168                        }
     169                    });
    151170                }
    152171            })
  • facial-recognition-authentication/trunk/facial-recognition-authentication.php

    r3252297 r3252815  
    1414Description: Face ID registration and login for WordPress
    1515Author: New-way
    16 Version: 1.1.0
     16Version: 1.1.1
    1717*/
    1818
  • facial-recognition-authentication/trunk/inc/frontend.php

    r3245333 r3252815  
    1414    }
    1515
    16     $domain = get_site_url();  // دامنه فعلی رو می‌فرستیم
     16    $domain = get_site_url();
    1717    wp_localize_script('main2.js', 'pluginData', array(
    1818        'login_url' => site_url('/wp-login.php'),
    19         'domain' => $domain  // تغییر از site_id به domain
     19        'domain' => $domain,
     20        'is_wordfence_2fa_active' => class_exists('wfUtils') && wfConfig::get('is2faEnabled') ? 'true' : 'false' // چک کردن 2FA
    2021    ));
    2122}
    2223
    23 add_action('login_enqueue_scripts', 'fra_faceid_load_assets');
     24// اولویت بالا برای لود قبل از Wordfence
     25add_action('login_enqueue_scripts', 'fra_faceid_load_assets', 5); // اولویت 5 که زودتر از بقیه باشه
    2426
    2527function fra_faceid_login() {
     
    3133function fra_faceid_handle_login() {
    3234    if (!headers_sent()) {
     35        // غیرفعال کردن فرم ورود پیش‌فرض وردپرس
     36        remove_all_actions('login_form'); // حذف فرم‌های دیگه مثل Wordfence
    3337        fra_faceid_login();
    3438        exit;
     
    3640}
    3741
     42// همیشه اجرا شه مگه اینکه رفرش شده باشه
    3843if (isset($_GET['refreshed_by_js']) && $_GET['refreshed_by_js'] === 'true') {
    39     remove_action("login_head", "fra_faceid_handle_login");
     44    remove_action('login_head', 'fra_faceid_handle_login');
    4045} else {
    41     add_action('login_head', 'fra_faceid_handle_login');
     46    add_action('login_head', 'fra_faceid_handle_login', 1); // اولویت 1 برای اجرا قبل از Wordfence
    4247}
  • facial-recognition-authentication/trunk/readme.txt

    r3252297 r3252815  
    55Tested up to: 6.7
    66Requires PHP: 7.4
    7 Stable tag: 1.1.0
     7Stable tag: 1.1.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    7676No, our plugin works with any standard webcam.
    7777
     78= Does it work with Wordfence’s Two-Factor Authentication (2FA)? =
     79Yes, as of version 1.1.1, the plugin is fully compatible with Wordfence, including its 2FA feature. Facial recognition runs first, followed by 2FA if enabled.
     80
    7881== Screenshots ==
    7982
     
    8386
    8487== Changelog ==
     88
     89= 1.1.1 - 2025-03-09 =
     90* Added compatibility with Wordfence, including its Two-Factor Authentication (2FA) feature. Facial recognition now runs before 2FA for enhanced security.
    8591
    8692= 1.1.0 - 2025-03-07 =
     
    111117
    112118== Upgrade Notice ==
     119
     120= 1.1.1 =
     121This update adds full compatibility with Wordfence, including its 2FA feature. Facial recognition now runs before 2FA, ensuring seamless integration. Highly recommended update.
    113122
    114123= 1.1.0 =
Note: See TracChangeset for help on using the changeset viewer.