Ticket #24456: 24456.diff
File 24456.diff, 1.6 KB (added by , 12 years ago) |
---|
-
wp-includes/media.php
841 841 * @param array $attr Attributes of the shortcode. 842 842 * @return string HTML content to display audio. 843 843 */ 844 function wp_audio_shortcode( $attr ) {844 function wp_audio_shortcode( $attr, $content = null ) { 845 845 $post_id = get_post() ? get_the_ID() : 0; 846 846 847 847 static $instances = 0; … … 854 854 foreach ( $default_types as $type ) 855 855 $defaults_atts[$type] = ''; 856 856 857 if ( empty( $attr['src'] ) && ! empty( $content ) ) 858 $attr['src'] = $content; 859 857 860 $atts = shortcode_atts( $defaults_atts, $attr, 'audio' ); 858 861 extract( $atts ); 859 862 … … 940 943 * @param array $attr Attributes of the shortcode. 941 944 * @return string HTML content to display video. 942 945 */ 943 function wp_video_shortcode( $attr ) {946 function wp_video_shortcode( $attr, $content = null ) { 944 947 global $content_width; 945 948 $post_id = get_post() ? get_the_ID() : 0; 946 949 … … 960 963 foreach ( $default_types as $type ) 961 964 $defaults_atts[$type] = ''; 962 965 966 if ( empty( $attr['src'] ) && ! empty( $content ) ) 967 $attr['src'] = $content; 968 963 969 $atts = shortcode_atts( $defaults_atts, $attr, 'video' ); 964 970 extract( $atts ); 965 971 -
wp-includes/class-wp-embed.php
137 137 function shortcode( $attr, $url = '' ) { 138 138 $post = get_post(); 139 139 140 if ( ! empty( $attr['src'] ) ) 141 $url = $attr['src']; 142 140 143 if ( empty( $url ) ) 141 144 return ''; 142 145