diff --git a/class-two-factor-core.php b/class-two-factor-core.php index edda9dd2..988ee2a2 100644 --- a/class-two-factor-core.php +++ b/class-two-factor-core.php @@ -826,7 +826,7 @@ public static function login_html( $user, $login_nonce, $redirect_to, $error_msg foreach ( $backup_providers as $backup_provider_key => $backup_provider ) { $backup_link_args['provider'] = $backup_provider_key; $links[] = sprintf( - '
  • %2$s
  • ', + '%2$s', esc_url( self::login_url( $backup_link_args ) ), esc_html( $backup_provider->get_alternative_provider_label() ) ); @@ -834,14 +834,14 @@ public static function login_html( $user, $login_nonce, $redirect_to, $error_msg } /** - * Filters the backup links displayed on the two-factor login form. + * Filters the html links displayed on the two-factor login form. * * Plugins can use this filter to modify or add links to the two-factor authentication - * login form, allowing users to select backup methods for authentication. + * login form, allowing users to select backup methods for authentication or provide documentation links. * * @since 0.9.2 * - * @param array $links An array of backup links displayed on the two-factor login form. + * @param array $links An array of links displayed on the two-factor login form. */ $links = apply_filters( 'two_factor_login_backup_links', $links ); ?> @@ -854,7 +854,7 @@ public static function login_html( $user, $login_nonce, $redirect_to, $error_msg diff --git a/readme.txt b/readme.txt index f4baaffa..596405cc 100644 --- a/readme.txt +++ b/readme.txt @@ -28,6 +28,7 @@ Here is a list of action and filter hooks provided by the plugin: - `two_factor_enabled_providers_for_user` filter overrides the list of two-factor providers enabled for a user. First argument is an array of enabled provider classnames as values, the second argument is the user ID. - `two_factor_user_authenticated` action which receives the logged in `WP_User` object as the first argument for determining the logged in user right after the authentication workflow. - `two_factor_token_ttl` filter overrides the time interval in seconds that an email token is considered after generation. Accepts the time in seconds as the first argument and the ID of the `WP_User` object being authenticated. +- `two_factor_login_backup_links` filters the backup links displayed on the two-factor login form. == Frequently Asked Questions ==