WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r29678 r30423  
    12481248    }
    12491249
     1250    if ( $atts['type'] !== 'audio' ) {
     1251        $atts['type'] = 'video';
     1252    }
     1253
    12501254    $args = array(
    12511255        'post_status' => 'inherit',
     
    15971601        'class'    => apply_filters( 'wp_audio_shortcode_class', 'wp-audio-shortcode' ),
    15981602        'id'       => sprintf( 'audio-%d-%d', $post_id, $instances ),
    1599         'loop'     => $atts['loop'],
    1600         'autoplay' => $atts['autoplay'],
     1603        'loop'     => wp_validate_boolean( $atts['loop'] ),
     1604        'autoplay' => wp_validate_boolean( $atts['autoplay'] ),
    16011605        'preload'  => $atts['preload'],
    16021606        'style'    => 'width: 100%; visibility: hidden;',
     
    18231827        'height'   => absint( $atts['height'] ),
    18241828        'poster'   => esc_url( $atts['poster'] ),
    1825         'loop'     => $atts['loop'],
    1826         'autoplay' => $atts['autoplay'],
     1829        'loop'     => wp_validate_boolean( $atts['loop'] ),
     1830        'autoplay' => wp_validate_boolean( $atts['autoplay'] ),
    18271831        'preload'  => $atts['preload'],
    18281832    );
     
    26442648    if ( $attachment->post_parent ) {
    26452649        $post_parent = get_post( $attachment->post_parent );
     2650    } else {
     2651        $post_parent = false;
     2652    }
     2653
     2654    if ( $post_parent ) {
    26462655        $parent_type = get_post_type_object( $post_parent->post_type );
    26472656        if ( $parent_type && $parent_type->show_ui && current_user_can( 'edit_post', $attachment->post_parent ) ) {
Note: See TracChangeset for help on using the changeset viewer.