diff --git a/wp-includes/media.php b/wp-includes/media.php index 9b5d6a8cc1..f5c0d68cc2 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -856,7 +856,12 @@ function wp_audio_shortcode( $attr ) { $audio = null; $default_types = wp_get_audio_extensions(); - $defaults_atts = array( 'src' => '' ); + $defaults_atts = array( + 'src' => '', + 'loop' => '', + 'autoplay' => '', + 'preload' => 'none' + ); foreach ( $default_types as $type ) $defaults_atts[$type] = ''; @@ -900,11 +905,25 @@ function wp_audio_shortcode( $attr ) { } $atts = array( - sprintf( 'class="%s"', apply_filters( 'wp_audio_shortcode_class', 'wp-audio-shortcode' ) ), - sprintf( 'id="audio-%d-%d"', $post_id, $instances ), + 'class' => apply_filters( 'wp_audio_shortcode_class', 'wp-audio-shortcode' ), + 'id' => sprintf( 'audio-%d-%d', $post_id, $instances ), + 'loop' => $loop, + 'autoplay' => $autoplay, + 'preload' => $preload, ); - $html = sprintf( '