From 4a9e86841f050d95682ea7e5540e3b97e9791862 Mon Sep 17 00:00:00 2001 From: David Baumwald Date: Mon, 19 Sep 2022 17:07:52 +0000 Subject: [PATCH] Login and Registration: Add a new filter for the lost password link. On the login page, the "Register" link for new users has been filterable for some time. This change adds the ability to filter the "Lost your password?" link as well. Props wparslan, audrasjb, rafiahmedd, SergeyBiryukov, antonvlasenko, hellofromTonya. Fixes #55388. git-svn-id: https://develop.svn.wordpress.org/trunk@54206 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-login.php | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/wp-login.php b/src/wp-login.php index b0dd2b2f6d..c74f33f5cc 100644 --- a/src/wp-login.php +++ b/src/wp-login.php @@ -1103,8 +1103,16 @@ switch ( $action ) { %s', esc_url( wp_lostpassword_url() ), __( 'Lost your password?' ) ); + + /** + * Filters the link that allows the user to retrieve the lost password. + * + * @since 6.1.0 + * + * @param string $html_link HTML link to the lost password form. + */ + echo apply_filters( 'lost_password_html_link', $html_link ); + ?> -