WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#34990 closed defect (bug) (invalid)

Weird functionality of current_theme_supports('title-tag') in WordPress 4.4

Reported by: gnotaras Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.4
Component: Themes Keywords:
Focuses: Cc:

Description

It seems that current_theme_supports('title-tag') returns false for themes that have the title-tag feature enabled, like TwentyFifteen, under WordPress 4.4.

Change History (3)

#1 @swissspidy
3 years ago

  • Keywords reporter-feedback added
  • Version changed from trunk to 4.4

Where are you checking current_theme_supports('title-tag')? Theme support is added during the after_setup_theme action, so if you check it further up it won't work.

Tests_General_DocumentTitle and Tests_Theme_Supportcheck for that, so I'm not sure something broke in 4.4

#2 @gnotaras
3 years ago

Oh, I see. I used the following code in a testing plugin (was trying to add some logic based on the theme's features), while the TwentyFifteen theme, which has title-tag support, was activated:

if ( ! current_theme_supports('title-tag') ) {
    var_dump('12345');
}

Now I see this was a mistake. Please feel free to close this issue as invalid.

Thanks for your response and I'm sorry about that!

George

Last edited 3 years ago by gnotaras (previous) (diff)

#3 @swissspidy
3 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

No worries :)

Note: See TracTickets for help on using tickets.