[wp-trac] [WordPress Trac] #34456: Add add_theme_support('title-tag') to all default WordPress themes as wp_title() is deprecated since WordPress 4.4

WordPress Trac noreply at wordpress.org
Tue Nov 10 16:57:47 UTC 2015


#34456: Add add_theme_support('title-tag') to all default WordPress themes as
wp_title() is deprecated since WordPress 4.4
---------------------------------------+-----------------------
 Reporter:  Nikschavan                 |       Owner:  obenland
     Type:  defect (bug)               |      Status:  accepted
 Priority:  normal                     |   Milestone:  4.4
Component:  Bundled Theme              |     Version:  trunk
 Severity:  normal                     |  Resolution:
 Keywords:  has-patch has-screenshots  |     Focuses:
---------------------------------------+-----------------------

Comment (by ocean90):

 I'm think it's okay to not update old default themes, but
 [attachment:34456.diff] is meh. The function declaration should be outside
 of `wp_title()` otherwise it will lead to a "cannot redeclare" fatal error
 if `wp_title()` gets called twice.

 Wasn't there a suggestion to make `wp_title()` a wrapper for
 `wp_get_document_title()` somewhere?

 [[BR]]

 > If the `deprecated_function_trigger_error` filter had the function as a
 second argument we could even disable displaying the notice at all in
 these themes

 Related: #34183

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34456#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list