[wp-trac] [WordPress Trac] #54924: [video] shortcode with vimeo url
WordPress Trac
noreply at wordpress.org
Mon Mar 7 21:42:56 UTC 2022
#54924: [video] shortcode with vimeo url
------------------------------------------------+--------------------------
Reporter: elpix | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: Embeds | Version: 5.9
Severity: critical | Resolution:
Keywords: has-testing-info reporter-feedback | Focuses: ui
------------------------------------------------+--------------------------
Comment (by vijayhardaha):
after 4.8 or 4.9 changes were made due to some issue with ME.js, details
are available here
https://core.trac.wordpress.org/ticket/40866
{{{#!php
<?php
// Remove all query arguments and force SSL - see #40866.
$parsed_vimeo_url = wp_parse_url( $atts['src'] );
$vimeo_src = 'https://' . $parsed_vimeo_url['host'] .
$parsed_vimeo_url['path'];
// Add loop param for mejs bug - see #40977, not needed after #39686.
$loop = $atts['loop'] ? '1' : '0';
$atts['src'] = add_query_arg( 'loop', $loop, $vimeo_src );
}}}
This part of the code changes the src of vimeo urls.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54924#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list