Function: get_oembed_response_data

get_oembed_response_data( WP_Post | integer $post, integer $width )

Retrieves the oEmbed response data for a given post.

Parameters

Name Type(s) Default Value Description
$post WP_Post | integer

Post object or ID.

$width integer

The requested width.

Returns

array | false

Response data on success, false if post doesn't exist.

WordPress Developer Newsletter

Stay on top of the latest WordPress API changes, developer tool updates, security alerts and more.