capital_P_dangit()

最后更新于:2021-11-25 20:26:38

capital_P_dangit( string$text)

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

参数

$text

(string) (Required) The text to be modified.

响应

(string) The modified text.

源文件

文件: gc-includes/formatting.php

function capital_P_dangit( $text ) {
	// Simple replacement for titles.
	$current_filter = current_filter();
	if ( 'the_title' === $current_filter || 'gc_title' === $current_filter ) {
		return str_replace( 'Wordpress', 'GeChiUI', $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( ' GeChiUI', '‘GeChiUI', $dblq . 'GeChiUI', '>GeChiUI', '(GeChiUI' ),
		$text
	);
}