From e46cc9aaf14a86aed08e07c41849d5cf7f073c92 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 30 Apr 2024 14:51:49 +0200 Subject: [PATCH 1/2] Rely on just-in-time translation loading --- class-two-factor-core.php | 10 ---------- readme.txt | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/class-two-factor-core.php b/class-two-factor-core.php index 3c0df20a..5114d280 100644 --- a/class-two-factor-core.php +++ b/class-two-factor-core.php @@ -93,7 +93,6 @@ class Two_Factor_Core { * @since 0.1-dev */ public static function add_hooks( $compat ) { - add_action( 'plugins_loaded', array( __CLASS__, 'load_textdomain' ) ); add_action( 'init', array( __CLASS__, 'get_providers' ) ); add_action( 'wp_login', array( __CLASS__, 'wp_login' ), 10, 2 ); add_filter( 'wp_login_errors', array( __CLASS__, 'maybe_show_reset_password_notice' ) ); @@ -132,15 +131,6 @@ public static function add_hooks( $compat ) { $compat->init(); } - /** - * Loads the plugin's text domain. - * - * Sites on WordPress 4.6+ benefit from just-in-time loading of translations. - */ - public static function load_textdomain() { - load_plugin_textdomain( 'two-factor' ); - } - /** * For each provider, include it and then instantiate it. * diff --git a/readme.txt b/readme.txt index 5540ef68..fb9e18ba 100644 --- a/readme.txt +++ b/readme.txt @@ -1,7 +1,7 @@ === Two-Factor === Contributors: georgestephanis, valendesigns, stevenkword, extendwings, sgrant, aaroncampbell, johnbillion, stevegrunwell, netweb, kasparsd, alihusnainarshad, passoniate Tags: two factor, two step, authentication, login, totp, fido u2f, u2f, email, backup codes, 2fa, yubikey -Requires at least: 4.3 +Requires at least: 4.6 Tested up to: 6.5 Requires PHP: 5.6 Stable tag: 0.9.1 From d31431ce2b1084807d654f47f73b96d063f60589 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 30 Apr 2024 14:52:01 +0200 Subject: [PATCH 2/2] Properly define `Requires *` header in main plugin file --- two-factor.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/two-factor.php b/two-factor.php index feab321a..9be1f840 100644 --- a/two-factor.php +++ b/two-factor.php @@ -8,14 +8,16 @@ * @license GPL-2.0-or-later * * @wordpress-plugin - * Plugin Name: Two Factor - * Plugin URI: https://wordpress.org/plugins/two-factor/ - * Description: Two-Factor Authentication using time-based one-time passwords, Universal 2nd Factor (FIDO U2F), email and backup verification codes. - * Author: Plugin Contributors - * Version: 0.9.1 - * Author URI: https://github.com/wordpress/two-factor/graphs/contributors - * Network: True - * Text Domain: two-factor + * Plugin Name: Two Factor + * Plugin URI: https://wordpress.org/plugins/two-factor/ + * Description: wo-Factor Authentication using time-based one-time passwords, Universal 2nd Factor (FIDO U2F), email and backup verification codes. + * Author: Plugin Contributors + * Version: 0.9.1 + * Author URI: https://github.com/wordpress/two-factor/graphs/contributors + * Network: True + * Text Domain: two-factor + * Requires at least: 4.6 + * Requires PHP: 5.6 */ /**