• jomo

    (@jonathanmoorebcsorg)


    function remove_short_codes executes shortcodes instead of removing them

    This is a bad idea because many shortcodes are not expected to run in the context in which they are called here.

    I note the code:

    		if(class_exists("WPBMap")){
    			WPBMap::addAllMappedShortcodes(); // This does all the work
    			$content = apply_filters( 'the_content',$content);
    		}
    

    however WPBMap does not exist in standard install and so code proceeds to:
    return do_shortcode($content);

    Errors in do_shortcode result in the related item being omitted from the export file.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter jomo

    (@jonathanmoorebcsorg)

    How about the standard wordpress function strip_shortcodes() ?
    return strip_shortcodes($content);
    should do it..

    Thread Starter jomo

    (@jonathanmoorebcsorg)

    simple fix, still not done in latest update 2.2.22

    Thread Starter jomo

    (@jonathanmoorebcsorg)

    latest version 2.2.32 function remove_short_codes still does do_shortcode before strip_shortcodes – why?

    Thread Starter jomo

    (@jonathanmoorebcsorg)

    still outstanding in version 3.0.13, still processes the shortcodes instead of stripping them.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘function remove_short_codes executes shortcodes instead of removing them’ is closed to new replies.