WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/06/2014 08:22:32 AM (5 years ago)
Author:
nacin
Message:

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.

Merges [30185] to the 4.0 branch.

props wonderboymusic.
fixes #29825.

Location:
branches/4.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.0

  • branches/4.0/src/wp-includes/media.php

    r30259 r30261  
    15971597        'class'    => apply_filters( 'wp_audio_shortcode_class', 'wp-audio-shortcode' ),
    15981598        'id'       => sprintf( 'audio-%d-%d', $post_id, $instances ),
    1599         'loop'     => $atts['loop'],
    1600         'autoplay' => $atts['autoplay'],
     1599        'loop'     => wp_validate_boolean( $atts['loop'] ),
     1600        'autoplay' => wp_validate_boolean( $atts['autoplay'] ),
    16011601        'preload'  => $atts['preload'],
    16021602        'style'    => 'width: 100%; visibility: hidden;',
     
    18231823        'height'   => absint( $atts['height'] ),
    18241824        'poster'   => esc_url( $atts['poster'] ),
    1825         'loop'     => $atts['loop'],
    1826         'autoplay' => $atts['autoplay'],
     1825        'loop'     => wp_validate_boolean( $atts['loop'] ),
     1826        'autoplay' => wp_validate_boolean( $atts['autoplay'] ),
    18271827        'preload'  => $atts['preload'],
    18281828    );
Note: See TracChangeset for help on using the changeset viewer.