Ticket #16996: 16996-5.diff
File 16996-5.diff, 1.3 KB (added by , 14 years ago) |
---|
-
wp-includes/media.php
1344 1344 $height = 700; 1345 1345 1346 1346 return apply_filters( 'embed_defaults', array( 1347 ' width' => $width,1348 ' height' => $height,1347 'maxwidth' => $width, 1348 'maxheight' => $height, 1349 1349 ) ); 1350 1350 } 1351 1351 -
wp-includes/class-oembed.php
89 89 break; 90 90 } 91 91 } 92 93 $args = wp_parse_args( $args, wp_parse_args( parse_url( $url, PHP_URL_QUERY ), array() ) ); 92 94 93 95 if ( !$provider && $args['discover'] ) 94 96 $provider = $this->discover( $url ); … … 165 167 function fetch( $provider, $url, $args = '' ) { 166 168 $args = wp_parse_args( $args, wp_embed_defaults() ); 167 169 168 $provider = add_query_arg( 'maxwidth', $args['width'], $provider );169 $provider = add_query_arg( 'maxheight', $args['height'], $provider );170 170 $provider = add_query_arg( 'url', urlencode($url), $provider ); 171 $provider = add_query_arg( apply_filters( 'oembed_params_before_fetch', $args, $url, $provider ), $provider ); 171 172 172 173 foreach( array( 'json', 'xml' ) as $format ) { 173 174 $result = $this->_fetch_with_format( $provider, $format );