Function: get_oembed_endpoint_url

get_oembed_endpoint_url( string $permalink, string $format )

Retrieves the oEmbed endpoint URL for a given permalink.

Pass an empty string as the first argument to get the endpoint base URL.

Parameters

Name Type(s) Default Value Description
$permalink string ''

Optional. The permalink used for the url query arg. Default empty.

$format string 'json'

Optional. The requested response format. Default 'json'.

Returns

string

The oEmbed endpoint URL.

WordPress Developer Newsletter

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