From d8b13fa32b19f39a19a3947f798c902ae3b22f04 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Wed, 24 Jun 2015 21:06:26 +0000 Subject: [PATCH] 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 --- wp-includes/class-oembed.php | 8 ++++---- wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-includes/class-oembed.php b/wp-includes/class-oembed.php index 706660c134..401fedcc3b 100644 --- a/wp-includes/class-oembed.php +++ b/wp-includes/class-oembed.php @@ -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 ), diff --git a/wp-includes/version.php b/wp-includes/version.php index 60020b7d1d..ad9fad190c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.