apply_filters( 'no_texturize_shortcodes', string[] $default_no_texturize_shortcodes )

Filters the list of shortcodes not to texturize.


$default_no_texturize_shortcodes string[]
An array of shortcode names.

Top ↑

More Information

By default, WordPress will automatically texturize all post/page content through the wptexturize() function, even content in shortcodes. The texturize process replaces “normal” quotes with “fancy” quotes (aka “smart” quotes or “curly” quotes). Sometimes this is NOT what you want… particularly if your shortcode must contain raw, preprocessed text.

Top ↑


File: wp-includes/formatting.php. View all references

$no_texturize_shortcodes = apply_filters( 'no_texturize_shortcodes', $default_no_texturize_shortcodes );

Top ↑


Version Description
2.8.0 Introduced.

Top ↑

User Contributed Notes

  1. Skip to note 1 content
    Contributed by Steven Lin

    Example Migrated from Codex:

    The example below adds the shortcode “myshortcode” to the list of shortcodes not to texturize.

    add_filter( 'no_texturize_shortcodes', 'shortcodes_to_exempt_from_wptexturize' );
    function shortcodes_to_exempt_from_wptexturize( $shortcodes ) {
        $shortcodes[] = 'myshortcode';
        return $shortcodes;

You must log in before being able to contribute a note or feedback.