(un)wptexturize() — is it possible?

Don’t think so after skimming through the wptexturize() code, but what about using the run_wptexturize filter (untested):

// Turn off wptexturize
add_filter( 'run_wptexturize', '__return_false' );

// Your text handling here ...
$text = apply_filters( 'the_content', $text );

// Remove filter
remove_filter( 'run_wptexturize', '__return_false' );

i.e. just turn off the wptexturize only for your text handling?

Leave a Comment