Ticket #26631: 26631.11.diff
File 26631.11.diff, 1.8 KB (added by , 10 years ago) |
---|
-
wp-includes/media.php
1009 1009 $orderby = 'none'; 1010 1010 } 1011 1011 1012 if ( !in_array( $style, array( 'light', 'dark' ), true ) ) { 1013 $style = 'light'; 1014 } 1015 1012 1016 $args = array( 1013 1017 'post_status' => 'inherit', 1014 1018 'post_type' => 'attachment', … … 1109 1113 } 1110 1114 $data['tracks'] = $tracks; 1111 1115 1116 $safe_type = esc_attr( $safe_type ); 1117 $safe_style = esc_attr( $style ); 1118 1112 1119 ob_start(); 1113 1120 1114 1121 if ( 1 === $instance ): 1115 1122 wp_enqueue_style( 'wp-mediaelement' ); 1116 1123 wp_enqueue_script( 'wp-playlist' ); 1117 1124 ?> 1118 <!--[if lt IE 9]><script>document.createElement('<?php echo $type?>');</script><![endif]-->1125 <!--[if lt IE 9]><script>document.createElement('<?php echo esc_js( $type ) ?>');</script><![endif]--> 1119 1126 <script type="text/html" id="tmpl-wp-playlist-current-item"> 1120 1127 <# if ( data.image ) { #> 1121 1128 <img src="{{{ data.thumb.src }}}"/> … … 1150 1157 </div> 1151 1158 </script> 1152 1159 <?php endif ?> 1153 <div class="wp-playlist wp-<?php echo $ type ?>-playlist wp-playlist-<?php echo $style ?>">1160 <div class="wp-playlist wp-<?php echo $safe_type ?>-playlist wp-playlist-<?php echo $safe_style ?>"> 1154 1161 <?php if ( 'audio' === $type ): ?> 1155 1162 <div class="wp-playlist-current-item"></div> 1156 1163 <?php endif ?> 1157 <<?php echo $ type ?> controls="controls" preload="metadata" width="<?php echo $theme_width ?>"></<?php echo $type ?>>1164 <<?php echo $safe_type ?> controls="controls" preload="metadata" width="<?php echo (int) $theme_width ?>"></<?php echo $safe_type ?>> 1158 1165 <div class="wp-playlist-next"></div> 1159 1166 <div class="wp-playlist-prev"></div> 1160 1167 <noscript> … … 2590 2597 } 2591 2598 2592 2599 return current_theme_supports( 'post-thumbnails', $post->post_type ); 2593 } 2594 No newline at end of file 2600 }