WordPress.org

Make WordPress Core

Changeset 30185 for trunk


Ignore:
Timestamp:
11/03/2014 05:02:18 AM (6 years ago)
Author:
wonderboymusic
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.

Fixes #29825.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media.php

    r30161 r30185  
    15761576        'class'    => apply_filters( 'wp_audio_shortcode_class', 'wp-audio-shortcode' ),
    15771577        'id'       => sprintf( 'audio-%d-%d', $post_id, $instances ),
    1578         'loop'     => $atts['loop'],
    1579         'autoplay' => $atts['autoplay'],
     1578        'loop'     => wp_validate_boolean( $atts['loop'] ),
     1579        'autoplay' => wp_validate_boolean( $atts['autoplay'] ),
    15801580        'preload'  => $atts['preload'],
    15811581        'style'    => 'width: 100%; visibility: hidden;',
     
    18021802        'height'   => absint( $atts['height'] ),
    18031803        'poster'   => esc_url( $atts['poster'] ),
    1804         'loop'     => $atts['loop'],
    1805         'autoplay' => $atts['autoplay'],
     1804        'loop'     => wp_validate_boolean( $atts['loop'] ),
     1805        'autoplay' => wp_validate_boolean( $atts['autoplay'] ),
    18061806        'preload'  => $atts['preload'],
    18071807    );
Note: See TracChangeset for help on using the changeset viewer.