Ticket #41746: 41746.patch
File 41746.patch, 1.9 KB (added by , 7 years ago) |
---|
-
wp-includes/class-oembed.php
74 74 '#https?://(www\.)?twitter\.com/\w{1,15}/lists/.*#i' => array( 'https://publish.twitter.com/oembed', true ), 75 75 '#https?://(www\.)?twitter\.com/\w{1,15}/timelines/.*#i' => array( 'https://publish.twitter.com/oembed', true ), 76 76 '#https?://(www\.)?twitter\.com/i/moments/.*#i' => array( 'https://publish.twitter.com/oembed', true ), 77 /** With no provider URL, forces discovery of canonical provider */ 78 '#https?://(www\.)?twitter\.com/i/web/status(es)?/.*#i' => array( false, true ), 77 79 '#https?://vine\.co/v/.*#i' => array( 'https://vine.co/oembed.{format}', true ), 78 80 '#https?://(www\.)?soundcloud\.com/.*#i' => array( 'https://soundcloud.com/oembed', true ), 79 81 '#https?://(.+?\.)?slideshare\.net/.*#i' => array( 'https://www.slideshare.net/api/oembed/2', true ), … … 487 489 public function fetch( $provider, $url, $args = '' ) { 488 490 $args = wp_parse_args( $args, wp_embed_defaults( $url ) ); 489 491 492 /* See if the provider URL already has a 'url' parameter */ 493 $url_query = parse_url( $provider, PHP_URL_QUERY ); 494 parse_str( $url_query, $qvars ); 495 if ( isset( $qvars['url'] ) && !empty( $qvars['url'] ) ) { 496 /* We should consider this URL canonical */ 497 $url = urldecode( $qvars['url'] ); 498 } 499 490 500 $provider = add_query_arg( 'maxwidth', (int) $args['width'], $provider ); 491 501 $provider = add_query_arg( 'maxheight', (int) $args['height'], $provider ); 492 502 $provider = add_query_arg( 'url', urlencode($url), $provider );