Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function cleanup_shortcode_fix($content) {
- $array = array (
- '<p>[' => '[',
- ']</p>' => ']',
- ']<br />' => ']',
- ']<br>' => ']'
- );
- $content = strtr($content, $array);
- return $content;
- }
- add_filter('the_content', 'cleanup_shortcode_fix');
- $string=preg_replace_('/<p>s*</p>/', '', $string);
- add_filter('the_content', 'cleanup_shortcode_fix', 1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement