#54675 closed defect (bug) (fixed)
Add a filter to disable the login screen language dropdown
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.9 | Priority: | normal |
Severity: | normal | Version: | 5.9 |
Component: | Login and Registration | Keywords: | has-patch needs-dev-note commit has-testing-instructions |
Focuses: | Cc: |
Description
Change History (15)
This ticket was mentioned in PR #2074 on WordPress/wordpress-develop by audrasjb.
3 years ago
#2
- Keywords has-patch added; needs-patch removed
Trac ticket: https://core.trac.wordpress.org/ticket/54675
#3
@
3 years ago
The PR above adds the filter.
It correctly disable the language switcher, using this hook:
add_filter( 'display_login_language_dropdown', '__return_false' );
This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.
3 years ago
#5
@
3 years ago
- Keywords needs-dev-note added
- Milestone changed from Awaiting Review to 5.9
- Type changed from feature request to defect (bug)
Pulling into 5.9 and changing the type to defect. It's not technically a bug, but rather an opportunity to provide the ability to turn off the feature introduced in 5.9.
This one is part of #43700, which has a dev note. Marking needs-dev-note
as the new filter will need to be added to https://make.wordpress.org/core/2021/12/20/introducing-new-language-switcher-on-the-login-screen-in-wp-5-9/.
#6
@
3 years ago
Test Report
Env
- WordPress: trunk (with PR 2074 applied)
- Browser: Chrome v96.0.4664.110
- OS: Windows 10 (WSL2)
- Theme: Twenty Twenty-Two
- Block Editor
- Plugin: None activated
Steps to test
- Load
/wp-login.php
. - The languages dropdown should be visible.
- Add the following to Twenty Twenty-Two's
functions.php
file and Save:add_filter( 'display_login_language_dropdown', '__return_false' );
- Refresh
/wp-login.php
. - The languages dropdown should no longer be visible.
Results
- Before adding the filter, the languages dropdown was visible.
- After adding the filter, the languages dropdown was no longer visible.
- All works as expected. 👍
hellofromtonya commented on PR #2074:
3 years ago
#7
@costdev did a test report https://core.trac.wordpress.org/ticket/54675#comment:6. Its as expected ✅
#9
@
3 years ago
- Owner set to audrasjb
- Status changed from new to assigned
Self assigning for commit
#10
follow-up:
↓ 14
@
3 years ago
- Resolution set to fixed
- Status changed from assigned to closed
In 52404:
3 years ago
#12
Committed in https://core.trac.wordpress.org/changeset/52404
This ticket was mentioned in Slack in #polyglots by amieiro. View the logs.
3 years ago
#14
in reply to:
↑ 10
;
follow-up:
↓ 15
@
3 years ago
Hi, sorry, not a huge issue but thought it worth highlighting here, I just went to apply this to a site running the latest RC4 release to test preventing the language dropdown from showing on the login page and it wasn't working for me. I then noticed that the filter names were subsequently renamed in another code change on 03/01/2022 to login_display_language_dropdown
instead of the original display_login_language_dropdown
that this ticket originally defined it as. It wasn't until I double-checked my wp-login.php file of my site that I noticed that it had changed.
Thanks!
Replying to audrasjb:
In 52404:
#15
in reply to:
↑ 14
@
3 years ago
Replying to rickcurran:
I then noticed that the filter names were subsequently renamed in another code change on 03/01/2022 to
login_display_language_dropdown
instead of the originaldisplay_login_language_dropdown
that this ticket originally defined it as. It wasn't until I double-checked my wp-login.php file of my site that I noticed that it had changed.
Thanks for the comment! The filter names were indeed changed in #54696 for more consistency.
Related [meta11378]