[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 22:59:08 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 obenland):

 Replying to [comment:25 ocean90]:
 > Actually that's a back compat issue, because the new way was previoulsy
 `_wp_render_title_tag()`->`wp_title()` and thus the `wp_title` and
 `wp_title_parts` filters were available.

 The impact on backwards compatibility here should be limited. Chances that
 `wp_title` is being filtered for anything other than what
 `wp_get_document_title()` already accounts for are even more limited,
 especially for newer themes that would support title-tags. I also assume
 that the vast majority of themes has implemented theme support the way it
 was [https://make.wordpress.org/core/2014/10/29/title-tags-in-4-1/
 recommended on make/core], which would make this pretty much a non-
 concern.

 In retrospect we probably should have kept theme support for title-tags
 visible in `current_theme_supports()`, it would have allowed plugins to
 account for themes that declare it, even though they still might
 temporarily call `wp_title()`. While it's not as ideal as I'd like it to
 be, I don't think it's going to pose a problem.

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


More information about the wp-trac mailing list