Make WordPress Core

Ticket #25312: 25312.patch

File 25312.patch, 1.6 KB (added by SergeyBiryukov, 12 years ago)
  • src/wp-includes/media.php

     
    865865        foreach ( $default_types as $type )
    866866                $defaults_atts[$type] = '';
    867867
    868         $atts = shortcode_atts( $defaults_atts, $attr, 'audio' );
    869         extract( $atts );
     868        $shortcode_atts = shortcode_atts( $defaults_atts, $attr, 'audio' );
     869        extract( $shortcode_atts );
    870870
    871871        $primary = false;
    872872        if ( ! empty( $src ) ) {
     
    944944                $html .= wp_mediaelement_fallback( $fileurl );
    945945        $html .= '</audio>';
    946946
    947         return apply_filters( 'wp_audio_shortcode', $html, $atts, $audio, $post_id, $library );
     947        return apply_filters( 'wp_audio_shortcode', $html, $atts, $audio, $post_id, $library, $shortcode_atts );
    948948}
    949949add_shortcode( 'audio', apply_filters( 'wp_audio_shortcode_handler', 'wp_audio_shortcode' ) );
    950950
     
    992992        foreach ( $default_types as $type )
    993993                $defaults_atts[$type] = '';
    994994
    995         $atts = shortcode_atts( $defaults_atts, $attr, 'video' );
    996         extract( $atts );
     995        $shortcode_atts = shortcode_atts( $defaults_atts, $attr, 'video' );
     996        extract( $shortcode_atts );
    997997
    998998        $w = $width;
    999999        $h = $height;
     
    10881088        $html .= '</video>';
    10891089
    10901090        $html = sprintf( '<div style="width: %dpx; max-width: 100%%;">%s</div>', $width, $html );
    1091         return apply_filters( 'wp_video_shortcode', $html, $atts, $video, $post_id, $library );
     1091        return apply_filters( 'wp_video_shortcode', $html, $atts, $video, $post_id, $library, $shortcode_atts );
    10921092}
    10931093add_shortcode( 'video', apply_filters( 'wp_video_shortcode_handler', 'wp_video_shortcode' ) );
    10941094