Remove wptexturize from a shortcode?

There is a clue in wp-includes/formatting.php in the function wptexturize:

$default_no_texturize_shortcodes = array('code');
...
$no_texturize_shortcodes="(" . implode('|',
    apply_filters('no_texturize_shortcodes', $default_no_texturize_shortcodes) ) . ')';

Try using this filter to add a shortcode to the array:

function my_no_tex( $shortcodes ) {
    $shortcodes[] = 'someshortcode';
    return $shortcodes;
}
add_filter( 'no_texturize_shortcodes', 'my_no_tex' );

Leave a Comment