Automatické přepsání textu v příspěvku nebo komentáři

Do souboru fuctions.php (Vzhled > Upravit soubory) je třeba přidat následující kód:


function replace_text($string) {
	$string = str_ireplace('najdi', 'nahrad', $string);
	return $string;
}
add_filter('the_content', 'replace_text');
// resp.:
add_filter('comment_text', 'replace_text');