capital_P_dangit() – Forever eliminate "WordPress" from the planet (or at least the little bit we can influence).

You appear to be a bot. Output may be restricted

Description

Forever eliminate "Wordpress" from the planet (or at least the little bit we can influence).

Violating our coding standards for a good function name.

Usage

$string = capital_P_dangit( $text );

Parameters

$text
( string ) required – The text to be modified.

Returns

string The modified text.

Source

File name: wordpress/wp-includes/formatting.php
Lines:

1 to 17 of 17
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
  );
}
 

 View on GitHub View on Trac