Make WordPress Core


Ignore:
Timestamp:
07/14/2017 05:33:44 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.

Merges [40892] into the 4.8 branch.
Props timmydcrawford.
Amends [40640].
See #39686, #39994.
Fixes #40977 for 4.8.1.

Location:
branches/4.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.8

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

    r40847 r41054  
    25572557            // Remove all query arguments and force SSL - see #40866.
    25582558            $parsed_vimeo_url = wp_parse_url( $atts['src'] );
    2559             $atts['src'] = 'https://' . $parsed_vimeo_url['host'] . $parsed_vimeo_url['path'];
     2559            $vimeo_src = 'https://' . $parsed_vimeo_url['host'] . $parsed_vimeo_url['path'];
     2560
     2561            // Add loop param for mejs bug - see #40977, not needed after #39686.
     2562            $loop = $atts['loop'] ? '1' : '0';
     2563            $atts['src'] = add_query_arg( 'loop', $loop, $vimeo_src );
    25602564        }
    25612565    }
Note: See TracChangeset for help on using the changeset viewer.