Created
April 27, 2015 16:58
-
-
Save norcross/89c86f9e607b8ce48313 to your computer and use it in GitHub Desktop.
remove some weird tags on shortcodes
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 | |
add_filter( 'the_content', 'rkv_shortcode_cleanup',1001 ); | |
/** | |
* remove weird tags | |
* | |
* @param [type] $content [description] | |
*/ | |
function rkv_shortcode_cleanup( $content ) { | |
// clean it | |
$content = strtr( $content, array( '<p>[' => '[', ']</p>' => ']', ']<br>' => ']', ']<br />' => ']' ) ); | |
// return the content | |
return $content; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment