[wp-trac] Re: [WordPress Trac] #4407: Integrate Optimal Title

WordPress Trac wp-trac at lists.automattic.com
Tue Jun 5 15:22:56 GMT 2007


#4407: Integrate Optimal Title
--------------------------+-------------------------------------------------
 Reporter:  cpoteet       |        Owner:  rob1n      
     Type:  enhancement   |       Status:  new        
 Priority:  normal        |    Milestone:  2.3 (trunk)
Component:  Optimization  |      Version:             
 Severity:  normal        |   Resolution:             
 Keywords:  2nd-opinion   |  
--------------------------+-------------------------------------------------
Comment (by Otto42):

 Optimal title could be replaced by this code:

 {{{
 function optimal_title_filter($title, $sep) {
         $sections = explode(" $sep ", $title);
         array_push($sections, array_shift($sections));
         $optimal_title = implode(" $sep ", $sections);
         return $optimal_title;
 }
 add_filter('wp_title','optimal_title_filter',10,2);
 }}}

 This filter would make the normal wp_title() call function in the same way
 as optimal title 3.0 does. Just add the filter when needed.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4407#comment:3>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list