Make WordPress Core

Changeset 38365


Ignore:
Timestamp:
08/26/2016 10:38:05 AM (10 years ago)
Author:
johnbillion
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-oembed.php

    r38361 r38365  
    5656                $host = urlencode( home_url() );
    5757                $providers = array(
    58                         '#http://((m|www)\.)?youtube\.com/watch.*#i'          => array( 'http://www.youtube.com/oembed',                             true  ),
    59                         '#https://((m|www)\.)?youtube\.com/watch.*#i'         => array( 'http://www.youtube.com/oembed?scheme=https',                true  ),
    60                         '#http://((m|www)\.)?youtube\.com/playlist.*#i'       => array( 'http://www.youtube.com/oembed',                             true  ),
    61                         '#https://((m|www)\.)?youtube\.com/playlist.*#i'      => array( 'http://www.youtube.com/oembed?scheme=https',                true  ),
    62                         '#http://youtu\.be/.*#i'                              => array( 'http://www.youtube.com/oembed',                             true  ),
    63                         '#https://youtu\.be/.*#i'                             => array( 'http://www.youtube.com/oembed?scheme=https',                true  ),
     58                        '#https?://((m|www)\.)?youtube\.com/watch.*#i'        => array( 'https://www.youtube.com/oembed',                            true  ),
     59                        '#https?://((m|www)\.)?youtube\.com/playlist.*#i'     => array( 'https://www.youtube.com/oembed',                            true  ),
     60                        '#https?://youtu\.be/.*#i'                            => array( 'https://www.youtube.com/oembed',                            true  ),
    6461                        '#https?://(.+\.)?vimeo\.com/.*#i'                    => array( 'http://vimeo.com/api/oembed.{format}',                      true  ),
    6562                        '#https?://(www\.)?dailymotion\.com/.*#i'             => array( 'https://www.dailymotion.com/services/oembed',               true  ),
Note: See TracChangeset for help on using the changeset viewer.