Make WordPress Core


Ignore:
Timestamp:
06/09/2017 07:28:12 PM (7 years ago)
Author:
westonruter
Message:

Media: Restrict appending loop parameter to Vimeo URLs specifically and not all external URLs in Video widget (via shortcode).

Fixes issue where Video widgets embedding external files fail to get recognized due to the presence of the loop param after the video filename, even though it has a recognized extension. Regardless, the loop param is only present to fix a Vimeo issue in ME.js 2.x.

Props timmydcrawford.
Amends [40640].
See #39686, #39994.
Fixes #40977.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/widgets/class-wp-widget-media-video.php

    r40835 r40892  
    116116        }
    117117
     118        $src = $instance['url'];
    118119        if ( $attachment ) {
    119120            $src = wp_get_attachment_url( $attachment->ID );
    120         } else {
    121 
    122             // Manually add the loop query argument.
    123             $loop = $instance['loop'] ? '1' : '0';
    124             $src = empty( $instance['url'] ) ? $instance['url'] : add_query_arg( 'loop', $loop, $instance['url'] );
    125121        }
    126122
Note: See TracChangeset for help on using the changeset viewer.