YouTube oEmbed parsing: support the m subdomain.

Adds unit tests.

Props Toru, johnbillion.
Fixes #32714.

Built from https://develop.svn.wordpress.org/trunk@32930


git-svn-id: http://core.svn.wordpress.org/trunk@32901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-06-24 21:06:26 +00:00
parent f23199caaa
commit d8b13fa32b
2 changed files with 5 additions and 5 deletions

View File

@ -34,10 +34,10 @@ class WP_oEmbed {
*/
public function __construct() {
$providers = array(
'#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://((m|www)\.)?youtube\.com/watch.*#i' => array( 'http://www.youtube.com/oembed', true ),
'#https://((m|www)\.)?youtube\.com/watch.*#i' => array( 'http://www.youtube.com/oembed?scheme=https', true ),
'#http://((m|www)\.)?youtube\.com/playlist.*#i' => array( 'http://www.youtube.com/oembed', true ),
'#https://((m|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 ),

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-alpha-32929';
$wp_version = '4.3-alpha-32930';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.