Skip to content

Instantly share code, notes, and snippets.

Created December 18, 2012 16:12
Show Gist options
  • Save anonymous/4329321 to your computer and use it in GitHub Desktop.
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.
<?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