Make WordPress Core

Opened 10 years ago

Last modified 7 years ago

#37461 new enhancement

Introduce get_the_title_attribute() to wrap the_title_attribute( 'echo=0' )

Reported by: sillybean Owned by:
Priority: normal Milestone:
Component: Themes Version: 4.6
Severity: normal Keywords:
Cc: Focuses: template

Description

the_title_attribute( 'echo=0' ) is ugly and annoying given that all the other the_* template tags have corresponding get_* functions.

Patch adds get_title_attribute() as a simple wrapper function.

Attachments (2)

get_title_attribute.diff (807 bytes ) - added by sillybean 10 years ago.
get_the_title_attribute.diff (811 bytes ) - added by sillybean 10 years ago.

Download all attachments as: .zip

Change History (5)

#1 @SergeyBiryukov
10 years ago

Previously mentioned in comment:28:ticket:24164 (as get_the_title_attribute(), which would follow our naming pattern more closely).

#2 @sillybean
10 years ago

That is an outstanding comment. Updated patch to conform to the pattern.

#3 @SergeyBiryukov
10 years ago

  • Summary Introduce get_title_attribute() to wrap the_title_attribute( 'echo=0' )Introduce get_the_title_attribute() to wrap the_title_attribute( 'echo=0' )
Note: See TracTickets for help on using tickets.