#55388 closed enhancement (fixed)
Lost Password URL filtration
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Login and Registration | Keywords: | has-patch commit needs-dev-note has-test-report |
Focuses: | Cc: |
Description
We have a register URL filter to change the whole tag of register link on wp-login.php
wp-login.php line 1450
<?php $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) ); /** This filter is documented in wp-includes/general-template.php */ echo apply_filters( 'register', $registration_url );
So I suggest the lost password should also get the same treatment as well like;
<?php $lost_password_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_lostpassword_url() ), __( 'Lost your password?' ) ); echo apply_filters( 'lost_password_url', $lost_password_url );
Change History (15)
This ticket was mentioned in Slack in #core by wparslan. View the logs.
3 years ago
This ticket was mentioned in PR #2715 on WordPress/wordpress-develop by rolf-yoast.
3 years ago
#3
- Keywords has-patch added; needs-patch removed
#5
@
3 years ago
Hi, it looks great to me, thanks for the PR!
I added a small suggestion in the PR :)
This ticket was mentioned in PR #3248 on WordPress/wordpress-develop by dream-encode.
3 years ago
#8
Trac ticket: https://core.trac.wordpress.org/ticket/55388
SergeyBiryukov commented on PR #3248:
3 years ago
#9
Hi there, thanks for the PR! I have some notes:
lost_password_url
sounds pretty similar to the existinglostpassword_url
filter inwp_lostpassword_url()
. Since the new hook filters the whole link and not just the URL, I thinklost_password_html_link
would be a better name, for consistency with thelogin_site_html_link
filter added in r50117. I would personally drophtml
, but would prefer consistency here 🙂- There is exactly the same link below the registration form, it could also use the new filter.
f2e5ead addresses these suggestions.
#10
@
3 years ago
Test Report
This report validates that the indicated patch addresses the issue.
Patch tested: https://github.com/WordPress/wordpress-develop/pull/3248
Environment
- OS: macOS 12.6
- Web Server: Apache 2.x
- PHP: 8.0.29
- WordPress: 6.1-alpha-53344-src)
- Browser: Safari 16.0
- Theme: Twenty Twenty-Two
Actual Results
- ✅ I was able to change the "lost password" url on the
wp-login.php
page by adding a callback function for thelost_password_html_link
filter. This PR works as expected.
#11
@
3 years ago
- Keywords commit needs-dev-note has-test-report added
PR 3248 LTGM 👍. Has a valid testing report. Marking for commit
.
As a new filter is being added, also marking needs-dev-note
for it to be included in the misc dev note.
dream-encode commented on PR #3248:
3 years ago
#13
Merged into core in https://core.trac.wordpress.org/changeset/54206
dream-encode commented on PR #2715:
3 years ago
#14
Thanks for the PR! This was merged into Core in https://core.trac.wordpress.org/changeset/54206.
dream-encode commented on PR #2715:
3 years ago
#15
@rolf-yoast Can you point me to the w.org profiles for the following contributors? I'd like to make sure they get core props for this ticket.
@CasVisser, @JasmijnB & @CatoOri
Replaces the lost password link and adds a filter to it.
Also props to @CasVisser, @JasmijnB & @CatoOri
Trac ticket: https://core.trac.wordpress.org/ticket/55388