capital_P_dangit( string $text )

Forever eliminate “Classicpress” from the planet (or at least the little bit we can influence).


Description

Violating our coding standards for a good function name.


Parameters

$text

(Required) The text to be modified.


Return

(string) The modified text.


Source

File: wp-includes/formatting.php

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( 'Classicpress', 'ClassicPress', $text );
	// Still here? Use the more judicious replacement
	static $dblq = false;
	if ( false === $dblq ) {
		$dblq = _x( '“', 'opening curly double quote' );
	}
	return str_replace(
		array( ' Classicpress', '‘Classicpress', $dblq . 'Classicpress', '>Classicpress', '(Classicpress' ),
		array( ' ClassicPress', '‘ClassicPress', $dblq . 'ClassicPress', '>ClassicPress', '(ClassicPress' ),
	$text );
}


Changelog

Changelog
Version Description
WP-3.0.0 Introduced.