wp_oembed_get

Definition:
function wp_oembed_get( $url, $args = '' ) {}

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

Parameters

  • string $url: The URL that should be embedded.
  • array $args: Additional arguments and parameters.

Return values

returns:The original URL on failure or the embed HTML on success.

Source code

function wp_oembed_get( $url, $args = '' ) {

	require_once( ABSPATH . WPINC . '/class-oembed.php' );

	$oembed = _wp_oembed_get_object();

	return $oembed->get_html( $url, $args );

}

3963

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: