Make WordPress Core

Ticket #18719: 18719.diff

File 18719.diff, 1.1 KB (added by Otto42, 11 years ago)

Properly support https URLs for youtube oembeds

  • wp-includes/class-oembed.php

     
    3232                $this->providers = apply_filters( 'oembed_providers', array(
    3333                        '#http://(www\.)?youtube.com/watch.*#i'         => array( 'http://www.youtube.com/oembed',            true  ),
    3434                        'http://youtu.be/*'                             => array( 'http://www.youtube.com/oembed',            false ),
     35                        '#https://(www\.)?youtube.com/watch.*#i'        => array( 'http://www.youtube.com/oembed?scheme=https',true  ),
     36                        'https://youtu.be/*'                            => array( 'http://www.youtube.com/oembed?scheme=https',false ),
    3537                        'http://blip.tv/*'                              => array( 'http://blip.tv/oembed/',                   false ),
    3638                        '#http://(www\.)?vimeo\.com/.*#i'               => array( 'http://vimeo.com/api/oembed.{format}',     true  ),
    3739                        '#http://(www\.)?dailymotion\.com/.*#i'         => array( 'http://www.dailymotion.com/api/oembed',    true  ),