Tach auch,
ich schrieb mir eine Funktion, die WordPress korrekte deutsche Anführungszeichen beibringt.
Code
function typografie($content)
{
$content = str_replace (' “', ' „', $content);
$content = str_replace ('”', '“', $content);
$content = str_replace (' ‘', ' ‚', $content);
$content = str_replace ('’', '‘', $content);
$content = str_replace (' ‚n', ' ‘n', $content); // FIX: 'n/'ne
// ... auch bei ("...")
$content = str_replace (' (“', ' („', $content);
$content = str_replace (' (‘', ' (‚', $content);
$content = str_replace (' (‚n', ' (‘n', $content); // FIX: 'n/'ne
// ... auch bei <..>"..."</..>
$content = str_replace ('>“', '>„', $content);
$content = str_replace ('>‘', '>‚', $content);
$content = str_replace ('>‚n', '>‘n', $content); // FIX: 'n/'ne
return $content;
}
add_filter('the_content', 'typografie');
add_filter('the_title', 'typografie');
add_filter('comment_text', 'typografie');
Alles anzeigen
Problem: Im "content" macht er es, im "title" leider nicht.
Konkretes Beispiel: http://tuxproject.de/blog/2012/10/du-harry/
Was habe ich vergessen?