From cb686389689cf0dfbe7e9aebd1a8a6e4cbfc48de Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 27 May 2014 18:43:14 +0000 Subject: [PATCH] For YouTube playlist oEmbed, we need keep BC for `wp_oembed_remove_provider()` by not changing the existing YouTube endpoint keys. So, rather than merging the rules, the playlist endpoints should be on their own line. Props kovshenin. See #28125, [28552]. Built from https://develop.svn.wordpress.org/trunk@28593 git-svn-id: http://core.svn.wordpress.org/trunk@28418 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-oembed.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-includes/class-oembed.php b/wp-includes/class-oembed.php index 1b01119ee2..618cdba4fe 100644 --- a/wp-includes/class-oembed.php +++ b/wp-includes/class-oembed.php @@ -27,8 +27,10 @@ class WP_oEmbed { */ public function __construct() { $providers = array( - '#http://(www\.)?youtube\.com/(watch|playlist).*#i' => array( 'http://www.youtube.com/oembed', true ), - '#https://(www\.)?youtube\.com/(watch|playlist).*#i' => array( 'http://www.youtube.com/oembed?scheme=https', true ), + '#http://(www\.)?youtube\.com/watch.*#i' => array( 'http://www.youtube.com/oembed', true ), + '#https://(www\.)?youtube\.com/watch.*#i' => array( 'http://www.youtube.com/oembed?scheme=https', true ), + '#http://(www\.)?youtube\.com/playlist.*#i' => array( 'http://www.youtube.com/oembed', true ), + '#https://(www\.)?youtube\.com/playlist.*#i' => array( 'http://www.youtube.com/oembed?scheme=https', true ), '#http://youtu\.be/.*#i' => array( 'http://www.youtube.com/oembed', true ), '#https://youtu\.be/.*#i' => array( 'http://www.youtube.com/oembed?scheme=https', true ), 'http://blip.tv/*' => array( 'http://blip.tv/oembed/', false ),