Ticket #24458: 24458.diff
File 24458.diff, 1.3 KB (added by , 12 years ago) |
---|
-
wp-includes/media.php
function wp_audio_shortcode( $attr ) { 850 850 $audio = null; 851 851 852 852 $default_types = wp_get_audio_extensions(); 853 $defaults_atts = array( 'src' => '' ); 853 $defaults_atts = array( 854 'src' => '', 855 'id' => '' 856 ); 854 857 foreach ( $default_types as $type ) 855 858 $defaults_atts[$type] = ''; 856 859 857 860 $atts = shortcode_atts( $defaults_atts, $attr, 'audio' ); 858 861 extract( $atts ); 859 862 863 if ( $id ) // if 'id' is set, use that, and ignore 'src' 864 $src = wp_get_attachment_url( $id ); 865 860 866 $primary = false; 861 867 if ( ! empty( $src ) ) { 862 868 $type = wp_check_filetype( $src ); … … function wp_video_shortcode( $attr ) { 952 958 $default_types = wp_get_video_extensions(); 953 959 $defaults_atts = array( 954 960 'src' => '', 961 'id' => '', 955 962 'poster' => '', 956 963 'height' => 360, 957 964 'width' => empty( $content_width ) ? 640 : $content_width, … … function wp_video_shortcode( $attr ) { 963 970 $atts = shortcode_atts( $defaults_atts, $attr, 'video' ); 964 971 extract( $atts ); 965 972 973 if ( $id ) // if 'id' is set, use that, and ignore 'src' 974 $src = wp_get_attachment_url( $id ); 975 966 976 $w = $width; 967 977 $h = $height; 968 978 if ( is_admin() && $width > 600 )