WordPress at a glance

wp_oembed_get() WP 1.0

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

Works based on: WP_oEmbed::get_html()

No Hooks.


false/String. False on failure or the embed HTML on success.


wp_oembed_get( $url, $args );
$url(string) (required)
The URL that should be embedded.
Additional arguments and parameters for retrieving embed HTML.
Default: ''

Code of wp_oembed_get: wp-includes/embed.php VER 4.9.8

function wp_oembed_get( $url, $args = '' ) {
	$oembed = _wp_oembed_get_object();
	return $oembed->get_html( $url, $args );

Related Functions

From tag: WP Embeds (embedding URL in content)

More from category: Uncategorized

No comments
    Hello, !     Log In . Register