Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#35722 closed feature request (invalid)

title-tag not in global $_wp_theme_features

Reported by: cybr's profile Cybr Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.1
Component: Themes Keywords:
Focuses: Cc:

Description

Hi there,

The theme title-tag support has not been added to the global variable $_wp_theme_features, even when the theme supports it.

As you can see, it only adds a doing it wrong notice, but doesn't add the feature to $args:
https://core.trac.wordpress.org/browser/tags/4.4.2/src/wp-includes/theme.php#L1677

The codex says it does contain the check: https://codex.wordpress.org/Function_Reference/current_theme_supports

When added, plugins can check for this kind of theme support as well.

Thanks!

Change History (2)

#1 in reply to: ↑ description @obenland
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
  • Version changed from trunk to 4.1

Replying to Cybr:

The theme title-tag support has not been added to the global variable $_wp_theme_features, even when the theme supports it.
As you can see, it only adds a doing it wrong notice, but doesn't add the feature to $args:
https://core.trac.wordpress.org/browser/tags/4.4.2/src/wp-includes/theme.php#L1677

It actually does add it to $_wp_theme_features, otherwise the feature wouldn't work. It only doesn't add it if the wp_loaded action hasn't fired yet. In all other times the switch statement falls through to the last line of the function.

#2 @Cybr
9 years ago

Whoops!

Sorry about that, and thanks for pointing it out. I misread the last line.

Have a great day! :)

Note: See TracTickets for help on using tickets.