invokeArgs(array($content, $atts, $shortcode_name)); }, 10, 3); } public function the_shortcode($atts, $content="", $shortcode_name) { // merge and extract attributes extract(shortcode_atts(array( 'wrap' => '%s', 'label' => '', 'strip_html' => 'false', ), $atts, $shortcode_name)); // need to decide ordering - currently makes sense to process the specific filter first $content = apply_filters('arlo_shortcode_content_'.$shortcode_name, $content, $atts, $shortcode_name); $content = apply_filters('arlo_shortcode_content', $content, $atts, $shortcode_name); // run any shortcodes prior to conituning $content = do_shortcode($content); // if not empty, process labels and wrapping if(trim($content) != '') { //strip html, if neccessary if ($strip_html !== 'false') { if ($strip_html == 'true') { $content = strip_tags($content); } else { $content = strip_tags($content, $strip_html); } } // prepend label if (!empty($label)) { $content = ' ' . $content; } // wrap content $content = sprintf($wrap, $content); } return do_shortcode($content); } }