Ticket #24902: 24902.2.diff
| File 24902.2.diff, 1.9 KB (added by , 13 years ago) |
|---|
-
wp-includes/media.php
923 923 $attr_strings[] = $k . '="' . esc_attr( $v ) . '"'; 924 924 } 925 925 926 $html = sprintf( '<audio %s controls="controls">', join( ' ', $attr_strings ) ); 926 $html = ''; 927 if ( 'mediaelement' === $library && 1 === $instances ) 928 $html .= "<!--[if lt IE 9]><script>document.createElement('audio');</script><![endif]-->\n"; 929 $html .= sprintf( '<audio %s controls="controls">', join( ' ', $attr_strings ) ); 927 930 928 931 $fileurl = ''; 929 932 $source = '<source type="%s" src="%s" />'; … … 940 943 $html .= wp_mediaelement_fallback( $fileurl ); 941 944 $html .= '</audio>'; 942 945 943 return apply_filters( 'wp_audio_shortcode', $html, $atts, $audio, $post_id );946 return apply_filters( 'wp_audio_shortcode', $html, $atts, $audio, $post_id, $library ); 944 947 } 945 948 add_shortcode( 'audio', apply_filters( 'wp_audio_shortcode_handler', 'wp_audio_shortcode' ) ); 946 949 … … 1061 1064 $attr_strings[] = $k . '="' . esc_attr( $v ) . '"'; 1062 1065 } 1063 1066 1064 $html = sprintf( '<video %s controls="controls">', join( ' ', $attr_strings ) ); 1067 $html = ''; 1068 if ( 'mediaelement' === $library && 1 === $instances ) 1069 $html .= "<!--[if lt IE 9]><script>document.createElement('video');</script><![endif]-->\n"; 1070 $html .= sprintf( '<video %s controls="controls">', join( ' ', $attr_strings ) ); 1065 1071 1066 1072 $fileurl = ''; 1067 1073 $source = '<source type="%s" src="%s" />'; … … 1081 1087 $html .= '</video>'; 1082 1088 1083 1089 $html = sprintf( '<div style="width: %dpx; max-width: 100%%;">%s</div>', $width, $html ); 1084 return apply_filters( 'wp_video_shortcode', $html, $atts, $video, $post_id );1090 return apply_filters( 'wp_video_shortcode', $html, $atts, $video, $post_id, $library ); 1085 1091 } 1086 1092 add_shortcode( 'video', apply_filters( 'wp_video_shortcode_handler', 'wp_video_shortcode' ) ); 1087 1093
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)