wp_oembed_get( string $url, array $args = '' )

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


Description Description

See also See also


Top ↑

Parameters Parameters

$url

(string) (Required) The URL that should be embedded.

$args

(array) (Optional) Additional arguments and parameters for retrieving embed HTML.

Default value: ''


Top ↑

Return Return

(false|string) False on failure or the embed HTML on success.


Top ↑

Source Source

File: wp-includes/embed.php

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

Top ↑

Changelog Changelog

Changelog
Version Description
2.9.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.