oembed_remote_get_args

oembed_remote_get_args

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.1

apply_filters('oembed_remote_get_args') is found 2 times:

  • /wp-includes/class-wp-oembed.php line 455
    		 *
    		 * @param array  $args oEmbed remote get arguments.
    		 * @param string $url  URL to be inspected.
    		 */
    		$args = apply_filters( 'oembed_remote_get_args', $args, $url );
    
    		// Fetch URL content.
    		$request = wp_safe_remote_get( $url, $args );
    		$html    = wp_remote_retrieve_body( $request );
    		if ( $html ) {
    
    
  • /wp-includes/class-wp-oembed.php line 578
    	private function _fetch_with_format( $provider_url_with_args, $format ) {
    		$provider_url_with_args = add_query_arg( 'format', $format, $provider_url_with_args );
    
    		/** This filter is documented in wp-includes/class-wp-oembed.php */
    		$args = apply_filters( 'oembed_remote_get_args', array(), $provider_url_with_args );
    
    		$response = wp_safe_remote_get( $provider_url_with_args, $args );
    
    		if ( 501 === wp_remote_retrieve_response_code( $response ) ) {
    			return new WP_Error( 'not-implemented' );
    		}
    

See this hook used in plugins: