From c7884d542ee6a7d2be05865ee39e4b2fed35c85e Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Fri, 26 Aug 2016 10:39:32 +0000 Subject: [PATCH] Embeds: Always use the HTTPS endpoint for YouTube embeds. The `scheme` parameter is no longer required as all YouTube assets now use HTTPS. See #36274, #28507 Props zsusag, tollmanz Built from https://develop.svn.wordpress.org/trunk@38365 git-svn-id: http://core.svn.wordpress.org/trunk@38306 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-oembed.php | 9 +++------ wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/wp-includes/class-oembed.php b/wp-includes/class-oembed.php index 6490b1719f..dd4783137b 100644 --- a/wp-includes/class-oembed.php +++ b/wp-includes/class-oembed.php @@ -55,12 +55,9 @@ class WP_oEmbed { public function __construct() { $host = urlencode( home_url() ); $providers = array( - '#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 ), + '#https?://((m|www)\.)?youtube\.com/watch.*#i' => array( 'https://www.youtube.com/oembed', true ), + '#https?://((m|www)\.)?youtube\.com/playlist.*#i' => array( 'https://www.youtube.com/oembed', true ), + '#https?://youtu\.be/.*#i' => array( 'https://www.youtube.com/oembed', true ), '#https?://(.+\.)?vimeo\.com/.*#i' => array( 'http://vimeo.com/api/oembed.{format}', true ), '#https?://(www\.)?dailymotion\.com/.*#i' => array( 'https://www.dailymotion.com/services/oembed', true ), '#https?://dai.ly/.*#i' => array( 'https://www.dailymotion.com/services/oembed', true ), diff --git a/wp-includes/version.php b/wp-includes/version.php index e7263a0b57..9e6ecc18c3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-alpha-38364'; +$wp_version = '4.7-alpha-38365'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.