Ticket #13971: 13971-more-judicious.diff
| File 13971-more-judicious.diff, 1.9 KB (added by , 16 years ago) |
|---|
-
wp-includes/default-filters.php
87 87 } 88 88 89 89 // Format WordPress 90 foreach ( array( 'the_content', 'the_title', 'comment_text' ) as $filter ) 91 add_filter( $filter, 'capital_P_dangit' ); 90 foreach ( array( 'the_content', 'comment_text' ) as $filter ) 91 add_filter( $filter, 'capital_P_gosh_dangit', 11 ); 92 add_filter( 'the_title', 'capital_P_dangit' ); 92 93 93 94 // Format titles 94 95 foreach ( array( 'single_post_title', 'single_cat_title', 'single_tag_title', 'single_month_title', 'nav_menu_attr_title', 'nav_menu_description' ) as $filter ) { -
wp-includes/formatting.php
2820 2820 2821 2821 /** 2822 2822 * Forever eliminate "Wordpress" from the planet (or at least the little bit we can influence). 2823 * Replaces all instances. 2823 2824 * 2824 2825 * Violating our coding standards for a good function name. 2825 2826 * 2826 2827 * @since 3.0.0 2827 2828 */ 2829 2828 2830 function capital_P_dangit( $text ) { 2829 2831 return str_replace( 'Wordpress', 'WordPress', $text ); 2830 2832 } 2831 2833 2834 /** 2835 * Forever eliminate "Wordpress" from the planet (or at least the little bit we can influence). 2836 * More selective version that tries to avoid cases where a URL might be bungled. 2837 * 2838 * Violating our coding standards for a good function name. 2839 * 2840 * @since 3.0.1 2841 */ 2842 function capital_P_gosh_dangit( $text ) { 2843 static $dblq = false; 2844 if ( false === $dblq ) 2845 $dblq = _x('“', 'opening curly quote'); 2846 return str_replace( 2847 array( ' Wordpress', '‘Wordpress', $dblq . 'Wordpress', '>Wordpress', '(Wordpress' ), 2848 array( ' WordPress', '‘WordPress', $dblq . 'WordPress', '>WordPress', '(WordPress' ), 2849 $text ); 2850 } 2851 2832 2852 ?>