Function: wp_oembed_get

wp_oembed_get( string $url, array $args )

Attempts to fetch the embed HTML for a provided URL using oEmbed.


Name Type(s) Default Value Description
$url string

The URL that should be embedded.

$args array ''

Optional. Additional arguments and parameters for retrieving embed HTML. Default empty.


false | string

False on failure or the embed HTML on success.

WordPress Developer Newsletter

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