Ticket #24820: media-shortcode-cleanup.diff
| File media-shortcode-cleanup.diff, 2.3 KB (added by , 13 years ago) |
|---|
-
wp-includes/js/mediaelement/wp-mediaelement.js
6 6 $(function () { 7 7 $('.wp-audio-shortcode, .wp-video-shortcode').mediaelementplayer(); 8 8 }); 9 10 9 }(jQuery)); 11 No newline at end of file -
wp-includes/media.php
860 860 'src' => '', 861 861 'loop' => '', 862 862 'autoplay' => '', 863 'preload' => 'none' 863 'preload' => 'none', 864 'width' => empty( $content_width ) ? 640 : $content_width 865 864 866 ); 865 867 foreach ( $default_types as $type ) 866 868 $defaults_atts[$type] = ''; … … 872 874 if ( ! empty( $src ) ) { 873 875 $type = wp_check_filetype( $src ); 874 876 if ( ! in_array( $type['ext'], $default_types ) ) 875 return sprintf( '<a class="wp- post-format-link-audio" href="%s">%s</a>', esc_url( $src ), esc_html( $src ) );877 return sprintf( '<a class="wp-media-embedded wp-audio" href="%s">%s</a>', esc_url( $src ), esc_html( $src ) ); 876 878 $primary = true; 877 879 array_unshift( $default_types, 'src' ); 878 880 } else { … … 902 904 if ( 'mediaelement' === $library && did_action( 'init' ) ) { 903 905 wp_enqueue_style( 'wp-mediaelement' ); 904 906 wp_enqueue_script( 'wp-mediaelement' ); 907 wp_localize_script( 'wp_mediaelement', 'mediaelementArgs', array( 'maxWidth' => $max_width )); 905 908 } 906 909 907 910 $atts = array( … … 1007 1010 if ( ! empty( $src ) ) { 1008 1011 $type = wp_check_filetype( $src ); 1009 1012 if ( ! in_array( $type['ext'], $default_types ) ) 1010 return sprintf( '<a class="wp- post-format-link-video" href="%s">%s</a>', esc_url( $src ), esc_html( $src ) );1013 return sprintf( '<a class="wp-media-embedded wp-video" href="%s">%s</a>', esc_url( $src ), esc_html( $src ) ); 1011 1014 $primary = true; 1012 1015 array_unshift( $default_types, 'src' ); 1013 1016 } else { … … 1037 1040 if ( 'mediaelement' === $library && did_action( 'init' ) ) { 1038 1041 wp_enqueue_style( 'wp-mediaelement' ); 1039 1042 wp_enqueue_script( 'wp-mediaelement' ); 1043 wp_localize_script( 'wp_mediaelement', 'mediaelementArgs', array( 'width' => $width )); 1044 1040 1045 } 1041 1046 1042 1047 $atts = array(
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)