Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Filtering WordPress curly quotes
<?php
function md_filter_curly_double_quotes( $translations, $text, $context, $domain ) {
if ( 'opening curly double quote' == $context && '&#8220;' == $text ) {
$translations = '&#0171;';
} else if ( 'closing curly double quote' == $context && '&#8221;' == $text ) {
$translations = '&#0187;';
}
return $translations;
}
add_filter( 'gettext_with_context', 'md_filter_curly_double_quotes', 888, 4 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.