Ticket #16996: 16996-2.diff
File 16996-2.diff, 1.2 KB (added by , 14 years ago) |
---|
-
wp-includes/class-oembed.php
163 163 * @return bool|object False on failure, otherwise the result in the form of an object. 164 164 */ 165 165 function fetch( $provider, $url, $args = '' ) { 166 // Add any URL query arguments to the oEmbed arguments - shortcode args have priority 167 $link_args = parse_url( $url, PHP_URL_QUERY ); 168 wp_parse_str( $link_args, $link_args ); 169 $args = wp_parse_args( $args, $link_args ); 170 171 // Add any default oEmbed arguments - existing args have priority 166 172 $args = wp_parse_args( $args, wp_embed_defaults() ); 167 173 168 174 $provider = add_query_arg( 'maxwidth', $args['width'], $provider ); 169 175 $provider = add_query_arg( 'maxheight', $args['height'], $provider ); 170 176 $provider = add_query_arg( 'url', urlencode($url), $provider ); 177 178 // hackish way to remove strangely (non-oAuth) named args 179 unset($args['width']); 180 unset($args['height']); 181 unset($args['discover']); 182 183 $provider = add_query_arg( $args, $provider ); 171 184 172 185 foreach( array( 'json', 'xml' ) as $format ) { 173 186 $result = $this->_fetch_with_format( $provider, $format );