diff --git a/inc/class-shortcode-ui.php b/inc/class-shortcode-ui.php index 6e08d476..99d46d4c 100644 --- a/inc/class-shortcode-ui.php +++ b/inc/class-shortcode-ui.php @@ -439,6 +439,12 @@ private function render_shortcode_for_preview( $shortcode, $post_id = null ) { setup_postdata( $post ); // @codingStandardsIgnoreEnd } + + // Get the Shortcode tag and set the response if any + preg_match_all( '@\[([^<>&/\[\]\x00-\x20=]++)@', $shortcode, $matches ); + if( isset($matches[1][0]) && $response = apply_filters( 'shortcode_ui_preview', false, $matches[1][0], $shortcode, $this->get_shortcode( $matches[1][0] ) ) ) { + return $response; + } ob_start(); /**