Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#21264 closed enhancement (duplicate)

TwentyTwelve: wp_title should be filtered

Reported by: DrewAPicture Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.4.1
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:


Per Best Practices, we should now be setting the example by properly filtering wp_title() instead of tacking on get_bloginfo('name') inside the <title> tags.

Patch attached.

Attachments (1)

21264.diff (2.0 KB) - added by DrewAPicture 3 years ago.

Download all attachments as: .zip

Change History (5)

@DrewAPicture3 years ago

comment:1 @DrewAPicture3 years ago

  • Cc xoodrew@… added

If the conditions would be considered overkill, by all means chop away :)

comment:2 @SergeyBiryukov3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

comment:3 @lancewillett3 years ago

In [21394]:

Twenty Twelve: better comment block for twentytwelve_wp_title() and set passed arguments to empty strings for compatibility with plugins or child themes that might override wp_title() before this filter runs.

See #21264.

comment:4 @nacin3 years ago

In [21395]:

Revert parameter changes in [21394] as these are unnecessary.

Our plugin API always passes the requested number arguments to a callback,
even if previous callbacks asked for less arguments than later callbacks.

see #21264.

Note: See TracTickets for help on using tickets.