capital_P_dangit

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

Description

(string) capital_P_dangit( (string) $text ); 

Violating our coding standards for a good function name.

Returns (string)

The modified text.

Parameters (1)

0. $text (string)
The text to be modified.

Usage

  1. if ( !function_exists( 'capital_P_dangit' ) ) { 
  2. require_once ABSPATH . WPINC . '/formatting.php'; 
  3.  
  4. // The text to be modified. 
  5. $text = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = capital_P_dangit($text); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/formatting.php  
  1. function capital_P_dangit( $text ) { 
  2. // Simple replacement for titles 
  3. $current_filter = current_filter(); 
  4. if ( 'the_title' === $current_filter || 'wp_title' === $current_filter ) 
  5. return str_replace( 'Wordpress', 'WordPress', $text ); 
  6. // Still here? Use the more judicious replacement 
  7. static $dblq = false; 
  8. if ( false === $dblq ) { 
  9. $dblq = _x( '“', 'opening curly double quote' ); 
  10. return str_replace( 
  11. array( ' Wordpress', '‘Wordpress', $dblq . 'Wordpress', '>Wordpress', '(Wordpress' ),  
  12. array( ' WordPress', '‘WordPress', $dblq . 'WordPress', '>WordPress', '(WordPress' ),  
  13. $text );