[wp-trac] [WordPress Trac] #25796: capital_P_dangit : why only 'the_title' === current_filter() ?

WordPress Trac noreply at wordpress.org
Fri Nov 1 03:02:22 UTC 2013


#25796: capital_P_dangit : why only 'the_title' === current_filter() ?
--------------------------+-----------------------------
 Reporter:  tivnet        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Formatting    |    Version:
 Severity:  trivial       |   Keywords:
--------------------------+-----------------------------
 {{{
 function capital_P_dangit( $text ) {
         // Simple replacement for titles
         if ( 'the_title' === current_filter() )
                 return str_replace( 'Wordpress', 'WordPress', $text );
 }}}

 Just curious, why not also `wp_title` ?

 Instead of all this, maybe just `preg_replace` it?

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25796>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list