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].


git-svn-id: https://develop.svn.wordpress.org/trunk@28593 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-05-27 18:42:30 +00:00
parent 7b133a336f
commit 7eb0253744
1 changed files with 4 additions and 2 deletions

View File

@ -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 ),