Ticket #23431: 23431.diff

File 23431.diff, 594 bytes (added by jtsternberg, 3 months ago)

Simple check for the [embed] shortcode that allows filtering via do_shortcode()

  • wp-includes/shortcodes.php

     
    232232        $attr = shortcode_parse_atts( $m[3] ); 
    233233 
    234234        if ( isset( $m[5] ) ) { 
     235                // see docs for WP_Embed::run_shortcode() 
     236                if ( $tag == 'embed' && $shortcode_tags[$tag] == '__return_false' ) 
     237                        return $GLOBALS['wp_embed']->run_shortcode( $m[0] ); 
    235238                // enclosing tag - extra parameter 
    236239                return $m[1] . call_user_func( $shortcode_tags[$tag], $attr, $m[5], $tag ) . $m[6]; 
    237240        } else {