• Hello,

    I use your extension along with WPTouch, so WP Touch doesn’t show any shortcode tags in the mobile version of the site.

    I was however having a problem with nested shortcodes, example below:

    [accordion]
    [accordion_toggle title="ITEM 1"]
    <blockquote>Bla bla bla</blockquote>
    <div style="clear: both;"></div>
    [/accordion_toggle]
    [accordion_toggle title="ITEM 2"]
    <blockquote>Bla bla bla</blockquote>
    <p style="float: right;"><img title="" src="img.jpg" alt="" /></p>
    <div style="clear: both;"></div>
    [/accordion_toggle]
    [/accordion]

    Here is my modified version of the regular expression to fix this problem… it works fine now:
    $text = preg_replace("~(?:\[/?)(?!(?:$exclude_codes))[^/\]]+/?\]~s",'', $text); #strip shortcodes WITHOUT SHORTCODE CONTENT

    Regards,

    http://wordpress.org/extend/plugins/strip-non-registered-shortcodes-for-wordpress/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Strip Non Registered Shortcodes for WordPress] Nested shortcodes FIX’ is closed to new replies.