[wp-trac] [WordPress Trac] #23724: Pass $post into 'protected_title_format' and 'private_title_format' filters

WordPress Trac noreply at wordpress.org
Sat Mar 9 02:36:44 UTC 2013


#23724: Pass $post into 'protected_title_format' and 'private_title_format' filters
-----------------------------+------------------------------
 Reporter:  johnjamesjacoby  |       Owner:
     Type:  enhancement      |      Status:  new
 Priority:  low              |   Milestone:  Awaiting Review
Component:  Template         |     Version:  3.5
 Severity:  minor            |  Resolution:
 Keywords:  has-patch        |
-----------------------------+------------------------------
Changes (by SergeyBiryukov):

 * version:  trunk => 3.5


Comment:

 > I noticed also that we don't pass $post into the 'the_title' filter,
 which could cut down on an additional get_post() call later if we pass it
 here. Obviously not essential, but wouldn't hurt.

 I've found 14 instances of applying `the_title` filter in current trunk.
 Changing it in one place would be inconsistent, so this should be done a
 separate ticket. Previous inconsistencies (passing only one parameter)
 were fixed in #13558 and #16688.

 Passing `$post` to `protected_title_format` and `private_title_format`
 makes sense to me.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23724#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list