Ticket #23442: 23442-1.diff
| File 23442-1.diff, 1.1 KB (added by leewillis77, 4 months ago) |
|---|
-
class-oembed.php
108 108 $providers = array(); 109 109 110 110 // Fetch URL content 111 if ( $html = wp_remote_retrieve_body( wp_remote_get( $url ) ) ) { 111 $args = apply_filters( 'oembed_remote_get_args', array() ); 112 if ( $html = wp_remote_retrieve_body( wp_remote_get( $url, $args ) ) ) { 112 113 113 114 // <link> types that contain oEmbed provider URLs 114 115 $linktypes = apply_filters( 'oembed_linktypes', array( … … 190 191 */ 191 192 function _fetch_with_format( $provider_url_with_args, $format ) { 192 193 $provider_url_with_args = add_query_arg( 'format', $format, $provider_url_with_args ); 193 $response = wp_remote_get( $provider_url_with_args ); 194 $args = apply_filters( 'oembed_remote_get_args', array() ); 195 $response = wp_remote_get( $provider_url_with_args, $args ); 194 196 if ( 501 == wp_remote_retrieve_response_code( $response ) ) 195 197 return new WP_Error( 'not-implemented' ); 196 198 if ( ! $body = wp_remote_retrieve_body( $response ) )