[wp-trac] [WordPress Trac] #61555: Add deprecation notice to wp_title()
WordPress Trac
noreply at wordpress.org
Wed Jul 3 08:24:19 UTC 2024
#61555: Add deprecation notice to wp_title()
--------------------------+------------------------------------------------
Reporter: bedas | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: trunk
Severity: normal | Keywords: needs-docs 2nd-opinion needs-patch
Focuses: |
--------------------------+------------------------------------------------
The function wp_title() simply never considers is_front_page to be true,
and as such is broken.
''Legacy themes for example use wp_title'', see
https://core.trac.wordpress.org/ticket/57778, and the codex itself still
says you must use it https://codex.wordpress.org/Theme_Development,
**although I know that is not true anymore, in fact nowadays you must use
add_theme_support instead.**
---
I suggest to add a deprecation notice to this function, because afaik it
is not used in wp-core and as such, since broken anyway, shouldn't be
possible to be used in new code, and old code should be warned, if using
it.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61555>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list