Created
December 1, 2022 17:10
-
-
Save MattRyanCo/35fc56fd178d466a316b87860d0012ef to your computer and use it in GitHub Desktop.
Remove smart quote filtering on post title via wptexturize
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( ! function_exists( 'text-domain_remove_title_wptexturize' ) ) { | |
/** | |
* Turn off WP default smart quote conversions in post title. | |
*/ | |
function text-domain_remove_title_wptexturize() { | |
remove_filter( 'the_title', 'wptexturize' ); | |
} | |
add_action( 'init', 'text-domain_remove_title_wptexturize' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
WP Ref: https://developer.wordpress.org/reference/functions/wptexturize/.
Disable the whole shebang: https://developer.wordpress.org/reference/hooks/run_wptexturize/
add_filter('run_wptexturize', '__return_false');