Make WordPress Core

Opened 13 years ago

Closed 10 years ago

Last modified 10 years ago

#17877 closed enhancement (fixed)

Add a new wp_title_array filter to wp_title

Reported by: aaroncampbell's profile aaroncampbell Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.0 Priority: normal
Severity: normal Version: 3.1
Component: Themes Keywords: has-patch commit
Focuses: template Cc:

Description

It would be awesome to have a filter in wp_title() that would let you filter the array. Right now if any part of the title contains the title separator you can't tell what is a separator and what isn't using the wp_title filter. Additionally if we make the array filterable you could add additional parts to it without worrying about rtl vs ltr.

Attachments (3)

17877.diff (789 bytes) - added by aaroncampbell 13 years ago.
17877.2.diff (784 bytes) - added by aaroncampbell 12 years ago.
17877.3.diff (941 bytes) - added by obenland 10 years ago.
Added filter documentation

Download all attachments as: .zip

Change History (20)

@aaroncampbell
13 years ago

#1 @scribu
13 years ago

+1

I can't believe this hasn't been brought up before.

#2 @scribu
13 years ago

  • Component changed from General to Template
  • Keywords 3.3-early added
  • Type changed from defect (bug) to enhancement

#3 @scribu
13 years ago

  • Milestone changed from Awaiting Review to Future Release

#4 @scribu
13 years ago

  • Version changed from 3.2 to 3.1

#5 @Viper007Bond
13 years ago

+1 to this as well.

#6 @SergeyBiryukov
13 years ago

Is this still needed considering #18548?

#7 @aaroncampbell
13 years ago

Well, since #18548 doesn't actually affect wp_title we could still do this, but honestly if that one goes in I won't care about this one anymore since I'll be switching to the new way :)

#8 @scribu
12 years ago

I think 'wp_title_parts' or 'wp_title_sections' would be a better name for this.

#9 @aaroncampbell
12 years ago

17877.2.diff uses wp_title_parts for the filter name.

#10 @wonderboymusic
12 years ago

  • Milestone changed from Future Release to 3.6

#11 @DrewAPicture
11 years ago

+1 for wp_title_parts.

#12 @ryan
11 years ago

  • Milestone changed from 3.6 to Future Release

#13 @nacin
11 years ago

  • Component changed from Template to Themes
  • Focuses template added

@obenland
10 years ago

Added filter documentation

#14 @obenland
10 years ago

  • Keywords commit added; 3.3-early removed
  • Milestone changed from Future Release to 4.0

Low hanging fruit.
Refreshed patch with added filter documentation.

#15 @DrewAPicture
10 years ago

The hook docs in 17877.3.diff look good, though I'd prefer to use "page title" instead of "document title".

#16 @SergeyBiryukov
10 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 28669:

Add 'wp_title_parts' filter to wp_title().

props aaroncampbell, obenland.
fixes #17877.

Note: See TracTickets for help on using tickets.