WordPress at a glance

wp_oembed_get() WP 1.0

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

Notes:

Works based on: WP_oEmbed::get_html()

No Hooks.

Return

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

Usage

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

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

<?php
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