Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#22345 closed enhancement (wontfix)

Use different filter for the_title() and the_title_attribute()

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

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
14 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
14 years ago

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