In `wp_audio|video_shortcode()`, make sure that `autoplay` and `loop` are booleans. Passing `'false'` to them will force them to be active, which is bad.

Fixes #29825.

Built from https://develop.svn.wordpress.org/trunk@30185


git-svn-id: http://core.svn.wordpress.org/trunk@30185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-11-03 05:03:21 +00:00
parent a587ebc946
commit 15c062eb79
2 changed files with 5 additions and 5 deletions

View File

@ -1575,8 +1575,8 @@ function wp_audio_shortcode( $attr, $content = '' ) {
$html_atts = array(
'class' => apply_filters( 'wp_audio_shortcode_class', 'wp-audio-shortcode' ),
'id' => sprintf( 'audio-%d-%d', $post_id, $instances ),
'loop' => $atts['loop'],
'autoplay' => $atts['autoplay'],
'loop' => wp_validate_boolean( $atts['loop'] ),
'autoplay' => wp_validate_boolean( $atts['autoplay'] ),
'preload' => $atts['preload'],
'style' => 'width: 100%; visibility: hidden;',
);
@ -1801,8 +1801,8 @@ function wp_video_shortcode( $attr, $content = '' ) {
'width' => absint( $atts['width'] ),
'height' => absint( $atts['height'] ),
'poster' => esc_url( $atts['poster'] ),
'loop' => $atts['loop'],
'autoplay' => $atts['autoplay'],
'loop' => wp_validate_boolean( $atts['loop'] ),
'autoplay' => wp_validate_boolean( $atts['autoplay'] ),
'preload' => $atts['preload'],
);

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.1-alpha-30184';
$wp_version = '4.1-alpha-30185';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.