Ready to get started?Download WordPress


Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Plugin API/Filter Reference/no texturize shortcodes

This page is marked as incomplete. You can help Codex by expanding it.


The 'no_texturize_shortcodes' filter allows you to specify which shortcodes should not be run through the wptexturize() function.

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


(array) (required) An array of shortcodes to exempt from texturizations
Default: None


This filter reveals an array of texturize-exempted shortcode names. To use the filter, simply add a new item to the array for each shortcode you want to exempt from texturization.


Do not texturize the "myshortcode" contents:

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

Change Log

Since: 2.8.0

Source File

no_texturize_shortcodes is located in wp-includes/formatting.php.


Shortcode API