[wp-trac] [WordPress Trac] #12370: We need a smarter version of wp_title() and a few other template tags

WordPress Trac wp-trac at lists.automattic.com
Mon May 3 23:58:11 UTC 2010


#12370: We need a smarter version of wp_title() and a few other template tags
--------------------------+-------------------------------------------------
 Reporter:  Viper007Bond  |       Owner:  hallsofmontezuma   
     Type:  defect (bug)  |      Status:  accepted           
 Priority:  normal        |   Milestone:  3.0                
Component:  Template      |     Version:  3.0                
 Severity:  major         |    Keywords:  needs-patch blocker
--------------------------+-------------------------------------------------

Comment(by aaroncampbell):

 Sorry it took me so long to get this patch up (and it still needs better
 testing)...I got home and family was here waiting for us.  Anyway, this
 patch gets rid of the leading separator, use the newer 2010 text for 404s,
 uses the separator throughout (but leaves the default as » not |)
 and adds the new pre_wp_title filter.

 It converts the first argument to an args array but checks for a string
 and uses it as sep if needed (actually, just thinking about it I should
 probably have it parse args first, because args should be able to be a URL
 style string).  We'll need to actually deprecate the second and third
 arguments if we do it this way.  For now they're handled fine but no
 notice is given that they're deprecated.

 This patch also changes the 2010 title tag to `<title><?php wp_title( '|'
 ); ?></title>` and gets rid of `twentyten_the_page_number()` in favor of
 `get_the_page_number_title()` and `get_the_page_number()`

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


More information about the wp-trac mailing list