capital_P_dangit() WP 1.0
Forever eliminate "Wordpress" from the planet (or at least the little bit we can influence).
Violating our coding standards for a good function name.
No Hooks.
Return
String. The modified text.
Usage
capital_P_dangit( $text );
- $text(string) (required)
- The text to be modified.
Changelog
Since 3.0.0 | Introduced. |
Code of capital_P_dangit() capital P dangit WP 5.6
function capital_P_dangit( $text ) {
// Simple replacement for titles.
$current_filter = current_filter();
if ( 'the_title' === $current_filter || 'wp_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 double quote' );
}
return str_replace(
array( ' Wordpress', '‘Wordpress', $dblq . 'Wordpress', '>Wordpress', '(Wordpress' ),
array( ' WordPress', '‘WordPress', $dblq . 'WordPress', '>WordPress', '(WordPress' ),
$text
);
}Related Functions
From category: Formatting
- absint()
- add_magic_quotes()
- antispambot()
- backslashit()
- balanceTags()
- convert_smilies()
- ent2ncr()
- force_balance_tags()
- links_add_target()