/**
* Filters the determined post ID.
*
* @since 4.4.0
*
* @param int $post_id The post ID.
* @param string $url The requested URL.
*/
$post_id =
apply_filters( 'oembed_request_post_id',
$post_id,
$request['url'
] );
$data =
get_oembed_response_data( $post_id,
$request['maxwidth'
] );
if ( !
$data ) { return new WP_Error( 'oembed_invalid_url',
get_status_header_desc( 404
), array
( 'status' => 404
) );
} return $data;
} /**
* Checks if current user can make a proxy oEmbed request.
*
* @since 4.8.0
*
* @return true|WP_Error True if the request has read access, WP_Error object otherwise.
*/