From f1a547851bec7a8d5b6e0fed53dfea503dacacc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Mon, 15 Jul 2024 00:30:38 +0000 Subject: [PATCH] Fix typos --- class-two-factor-core.php | 20 ++++++++++---------- providers/class-two-factor-email.php | 2 +- readme.md | 2 +- two-factor.php | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/class-two-factor-core.php b/class-two-factor-core.php index 5114d280..edc9ebe6 100644 --- a/class-two-factor-core.php +++ b/class-two-factor-core.php @@ -57,7 +57,7 @@ class Two_Factor_Core { const USER_PASSWORD_WAS_RESET_KEY = '_two_factor_password_was_reset'; /** - * URL query paramater used for our custom actions. + * URL query parameter used for our custom actions. * * @var string */ @@ -389,7 +389,7 @@ public static function fetch_user( $user = null ) { /** * Get all Two-Factor Auth providers that are enabled for the specified|current user. * - * @param int|WP_User $user Optonal. User ID, or WP_User object of the the user. Defaults to current user. + * @param int|WP_User $user Optional. User ID, or WP_User object of the the user. Defaults to current user. * @return array */ public static function get_enabled_providers_for_user( $user = null ) { @@ -417,7 +417,7 @@ public static function get_enabled_providers_for_user( $user = null ) { /** * Get all Two-Factor Auth providers that are both enabled and configured for the specified|current user. * - * @param int|WP_User $user Optonal. User ID, or WP_User object of the the user. Defaults to current user. + * @param int|WP_User $user Optional. User ID, or WP_User object of the the user. Defaults to current user. * @return array */ public static function get_available_providers_for_user( $user = null ) { @@ -442,7 +442,7 @@ public static function get_available_providers_for_user( $user = null ) { /** * Fetch the provider for the request based on the user preferences. * - * @param int|WP_User $user Optonal. User ID, or WP_User object of the the user. Defaults to current user. + * @param int|WP_User $user Optional. User ID, or WP_User object of the the user. Defaults to current user. * @param null|string|object $preferred_provider Optional. The name of the provider, the provider, or empty. * @return null|object The provider */ @@ -480,7 +480,7 @@ public static function get_provider_for_user( $user = null, $preferred_provider * * @since 0.1-dev * - * @param int|WP_User $user Optonal. User ID, or WP_User object of the the user. Defaults to current user. + * @param int|WP_User $user Optional. User ID, or WP_User object of the the user. Defaults to current user. * @return object|null */ public static function get_primary_provider_for_user( $user = null ) { @@ -526,7 +526,7 @@ public static function get_primary_provider_for_user( $user = null ) { * * @since 0.1-dev * - * @param int|WP_User $user Optonal. User ID, or WP_User object of the the user. Defaults to current user. + * @param int|WP_User $user Optional. User ID, or WP_User object of the the user. Defaults to current user. * @return bool */ public static function is_user_using_two_factor( $user = null ) { @@ -683,8 +683,8 @@ public static function maybe_show_last_login_failure_notice( $user ) { echo '
'; printf( _n( - 'WARNING: Your account has attempted to login without providing a valid two factor token. The last failed login occured %2$s ago. If this wasn\'t you, you should reset your password.', - 'WARNING: Your account has attempted to login %1$s times without providing a valid two factor token. The last failed login occured %2$s ago. If this wasn\'t you, you should reset your password.', + 'WARNING: Your account has attempted to login without providing a valid two factor token. The last failed login occurred %2$s ago. If this wasn\'t you, you should reset your password.', + 'WARNING: Your account has attempted to login %1$s times without providing a valid two factor token. The last failed login occurred %2$s ago. If this wasn\'t you, you should reset your password.', $failed_login_count, 'two-factor' ), @@ -1434,7 +1434,7 @@ public static function _login_form_revalidate_2fa( $nonce = '', $provider = '', * @param object $provider The Two Factor Provider. * @param WP_User $user The user being authenticated. * @param bool $is_post_request Whether the request is a POST request. - * @return false|WP_Error|true WP_Error when an error occurs, true when the user is authenticated, false if no action occured. + * @return false|WP_Error|true WP_Error when an error occurs, true when the user is authenticated, false if no action occurred. */ public static function process_provider( $provider, $user, $is_post_request ) { if ( ! $provider ) { @@ -1470,7 +1470,7 @@ public static function process_provider( $provider, $user, $is_post_request ) { // Ask the provider to verify the second factor. if ( true !== $provider->validate_authentication( $user ) ) { - // Store the last time a failed login occured. + // Store the last time a failed login occurred. update_user_meta( $user->ID, self::USER_RATE_LIMIT_KEY, time() ); // Store the number of failed login attempts. diff --git a/providers/class-two-factor-email.php b/providers/class-two-factor-email.php index c6f5881f..ac3955ce 100644 --- a/providers/class-two-factor-email.php +++ b/providers/class-two-factor-email.php @@ -287,7 +287,7 @@ public function authentication_page( $user ) { * Send the email code if missing or requested. Stop the authentication * validation if a new token has been generated and sent. * - * @param WP_USer $user WP_User object of the logged-in user. + * @param WP_User $user WP_User object of the logged-in user. * @return boolean */ public function pre_process_authentication( $user ) { diff --git a/readme.md b/readme.md index e0f8cb20..5750f907 100644 --- a/readme.md +++ b/readme.md @@ -50,7 +50,7 @@ To view the code coverage report, you can open a web browser, go to `File > Open ## Deployments -Deployments [to WP.org plugin repository](https://wordpress.org/plugins/two-factor/) are handled automatically by the GitHub action [.github/workflows/deploy.yml](.github/workflows/deploy.yml). All merges to the `master` branch are commited to the [`trunk` directory](https://plugins.trac.wordpress.org/browser/two-factor/trunk) while all [Git tags](https://github.com/WordPress/two-factor/tags) are pushed as versioned releases [under the `tags` directory](https://plugins.trac.wordpress.org/browser/two-factor/tags). +Deployments [to WP.org plugin repository](https://wordpress.org/plugins/two-factor/) are handled automatically by the GitHub action [.github/workflows/deploy.yml](.github/workflows/deploy.yml). All merges to the `master` branch are committed to the [`trunk` directory](https://plugins.trac.wordpress.org/browser/two-factor/trunk) while all [Git tags](https://github.com/WordPress/two-factor/tags) are pushed as versioned releases [under the `tags` directory](https://plugins.trac.wordpress.org/browser/two-factor/tags). ## Known Issues diff --git a/two-factor.php b/two-factor.php index a81ee2cd..3f3754ac 100644 --- a/two-factor.php +++ b/two-factor.php @@ -43,7 +43,7 @@ require_once TWO_FACTOR_DIR . 'class-two-factor-core.php'; /** - * A compatability layer for some of the most-used plugins out there. + * A compatibility layer for some of the most-used plugins out there. */ require_once TWO_FACTOR_DIR . 'class-two-factor-compat.php';