WordPress.org

Make WordPress Core

Ticket #19626: 19626.2.diff

File 19626.2.diff, 803 bytes (added by Otto42, 4 years ago)

Patch updated to allow "statuses" which I get from some apps in the URL, and which works fine in the oembed as well.

  • wp-includes/class-oembed.php

     
    4747                        'http://wordpress.tv/*'                         => array( 'http://wordpress.tv/oembed/',              false ), 
    4848                        '#http://(.+\.)?polldaddy\.com/.*#i'            => array( 'http://polldaddy.com/oembed/',             true  ), 
    4949                        '#http://(www\.)?funnyordie\.com/videos/.*#i'   => array( 'http://www.funnyordie.com/oembed',         true  ), 
     50                        '#http(s)?://(www\.)?twitter.com/.+?/status(es)?/.*#i' => array( 'http://api.twitter.com/1/statuses/oembed.{format}', true), 
    5051                ) ); 
    5152 
    5253                // Fix any embeds that contain new lines in the middle of the HTML which breaks wpautop().