mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@40892 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -760,6 +760,31 @@ VIDEO;
|
||||
$this->assertNotContains( 'blah=meh', $actual );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 40977
|
||||
* @depends test_video_shortcode_body
|
||||
*/
|
||||
function test_wp_video_shortcode_vimeo_adds_loop() {
|
||||
$actual = wp_video_shortcode( array(
|
||||
'src' => 'http://vimeo.com/190372437',
|
||||
) );
|
||||
|
||||
$this->assertContains( 'src="https://vimeo.com/190372437?loop=0', $actual );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 40977
|
||||
* @depends test_video_shortcode_body
|
||||
*/
|
||||
function test_wp_video_shortcode_vimeo_force_adds_loop_true() {
|
||||
$actual = wp_video_shortcode( array(
|
||||
'src' => 'http://vimeo.com/190372437',
|
||||
'loop' => true,
|
||||
) );
|
||||
|
||||
$this->assertContains( 'src="https://vimeo.com/190372437?loop=1', $actual );
|
||||
}
|
||||
|
||||
/**
|
||||
* Test [video] shortcode processing
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user