Created
December 18, 2012 16:12
-
-
Save anonymous/4329321 to your computer and use it in GitHub Desktop.
Creates a notexturize shortcode useful for avoiding auto-formatting with wptexturize of the content, in WordPress.
This file contains hidden or 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
<?php | |
function my_notexturize_filter($default_no_texturize_shortcodes){ | |
$custom_shortcodes = array('notexturize'); return array_merge($default_no_texturize_shortcodes, $custom_shortcodes); | |
} | |
add_filter('no_texturize_shortcodes', 'my_notexturize_filter'); | |
function my_notexturize_shortcode($attribs, $content="", $code=""){ | |
return $content; | |
} | |
add_shortcode( 'notexturize', 'my_notexturize_shortcode' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment