capital_p_dangit [ WordPress Function ]
capital_p_dangit ( $text )
| Defined at: |
|
Benzer Fonksiyonlar: user_can_edit_post_date, privacy_ping_filter, wp_install_defaults, wp_initial_constants, uninstall_plugin
Forever eliminate "Wordpress" from the planet (or at least the little bit we can influence).
Violating our coding standards for a good function name.
Source
<?php
function capital_P_dangit( $text ) {
// Simple replacement for titles
if ( 'the_title' === current_filter() )
return str_replace( 'Wordpress', 'WordPress', $text );
// Still here? Use the more judicious replacement
static $dblq = false;
if ( false === $dblq )
$dblq = _x('“', 'opening curly quote');
return str_replace(
array( ' Wordpress', '‘Wordpress', $dblq . 'Wordpress', '>Wordpress', '(Wordpress' ),
array( ' WordPress', '‘WordPress', $dblq . 'WordPress', '>WordPress', '(WordPress' ),
$text );
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Function Reference/capital P dangit « WordPress Codex
Function Reference/capital P dangit ... <?php capital_P_dangit( $text ); ?> ... remove_filter( 'the_title', 'capital_P_dangit', 11 ); remove_filter( 'the_content', ...
codex.wordpress.org - #14043 (Remove capital_P_dangit) – WordPress Trac
While I understand that some may find other people's choice of case annoying, I think it's fair to say that the personal pedantries of WordPress's developers ...
core.trac.wordpress.org - Lowercase p, dangit!
Jul 8, 2010 ... Matt Mullenweg wrote a filter function called capital_P_dangit() that correctly capitalizes the “P” in misspellings of WordPress where the “p” is ...
justintadlock.com - Fix WordPress Capital P Dangit. What is it anyway?
Jul 17, 2010 ... At first look, its so silly. And if it was executed well, no one would have even noticed that. But that's not how things are now. Apparently, this ...
millionclues.com