Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#22345 closed enhancement (wontfix)

Use different filter for the_title() and the_title_attribute()

Reported by: zourbuth's profile zourbuth Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Template Keywords:
Focuses: Cc:

Description

Since the_title() and the_title_attribute() function use the same function get_the_title() to retrieve the title, I think there is no way to add the_title filter only for the_title() function.

Change History (2)

#1 @nacin
12 years ago

the_title_attribute() is designed to be the same as the_title(), with the exception of sanitizing it for an attribute (which includes, for example, stripping markup).

It makes sense that they run the same underlying filters. If you don't want to affect an attribute, you should probably not use the_title_attribute().

#2 @SergeyBiryukov
12 years ago

  • Component changed from General to Template
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed
  • Type changed from feature request to enhancement
Note: See TracTickets for help on using tickets.