#54696 closed defect (bug) (fixed)
Names for new wp-login.php filter
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.9 | Priority: | normal |
Severity: | normal | Version: | 5.9 |
Component: | Login and Registration | Keywords: | has-patch commit has-dev-note |
Focuses: | administration, coding-standards | Cc: |
Description
I think the newly intruduced filters in 5.9 should be renamed for more consisteny with other filters in wp-login.php.
display_login_language_dropdown
=> login_language_display_dropdown
wp_login_language_switcher_args
=> login_language_switcher_args
Example of existing filters
- login_enqueue_scripts
- login_title
- login_site_html_link
- login_headerurl
- login_headertext
Change History (26)
This ticket was mentioned in PR #2085 on WordPress/wordpress-develop by kebbet.
18 months ago
#1
- Keywords has-patch added; needs-patch removed
#5
@
17 months ago
- Keywords needs-dev-note added
These changes require to adjust the already published dev note: https://make.wordpress.org/core/2021/12/20/introducing-new-language-switcher-on-the-login-screen-in-wp-5-9/
#7
@
17 months ago
- Keywords needs-refresh added
This change looks relevant to me, even if we would still have some inconsistent filters like wp_login_errors
.
Also, login_display_language_dropdown
seems better than login_language_display_dropdown
.
#8
@
17 months ago
- Keywords needs-refresh removed
PR updated to use login_display_language_dropdown
.
#9
@
17 months ago
My only concern with the proposed name for the filter is that the order of the words in "login_display_language_dropdown" doesn't look "natural".
@SergeyBiryukov do we have a best practice for this?
There is nothing about word order in the PHP coding standards handbook page: https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/
#10
@
17 months ago
Maybe remove display from name? Or add something with visibility at the end and remove display?
#11
@
17 months ago
login_display_language_dropdown
seems correct to me, login_
prefixing the pålacement of the filter, and then the "descriptive" naming of "display language dropdown" yes/no (true/false).
#12
@
17 months ago
- Keywords commit added
I agree. login_display_language_dropdown
looks good to me too. The login_
prefix is consistent with many of the other filters in the same file. Marking PR 2085 for commit.
17 months ago
#16
Committed in https://core.trac.wordpress.org/changeset/52432
#17
@
17 months ago
- Keywords has-dev-note added; needs-dev-note removed
Just updated the dev note accordingly: https://make.wordpress.org/core/2021/12/20/introducing-new-language-switcher-on-the-login-screen-in-wp-5-9/
#18
@
17 months ago
- Resolution fixed deleted
- Status changed from closed to reopened
Sorry for reopening again, could we rename login_language_switcher_args
to login_language_dropdown_args
?
That would be more consistent with some other *_dropdown_args
filters:
taxonomy_parent_dropdown_args
post_edit_category_parent_dropdown_args
widget_archives_dropdown_args
widget_categories_dropdown_args
It would also be more consistent with the new login_display_language_dropdown
filter, which uses the dropdown
term instead of switcher
.
This ticket was mentioned in PR #2111 on WordPress/wordpress-develop by faisal-alvi.
17 months ago
#19
Trac ticket: https://core.trac.wordpress.org/ticket/54696
#20
@
17 months ago
@SergeyBiryukov Just did it https://github.com/WordPress/wordpress-develop/pull/2111
#21
@
17 months ago
- Keywords commit removed
Good point @SergeyBiryukov!
Thanks for the PR @faisal03, it looks good to me.
#23
@
17 months ago
- Keywords needs-dev-note added; has-dev-note removed
Re-adding needs-dev-note keyword, to not forget to update the existing devnote.
#25
@
17 months ago
- Keywords has-dev-note added; needs-dev-note removed
Devnote updated accordingly: https://make.wordpress.org/core/2021/12/20/introducing-new-language-switcher-on-the-login-screen-in-wp-5-9/
hellofromtonya commented on PR #2111:
17 months ago
#26
Committed via https://core.trac.wordpress.org/changeset/52435.
Trac ticket:
https://core.trac.wordpress.org/ticket/54696