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
This commit is contained in:
John Blackbourn 2016-08-26 10:39:32 +00:00
parent 6d87157eb9
commit c7884d542e
2 changed files with 4 additions and 7 deletions

View File

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

View File

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