Attempts to fetch the embed HTML for a provided URL using oEmbed.
$urlstringrequired
$argsarray|stringoptional
width int|stringmaxwidth value passed to the provider URL.height int|stringmaxheight value passed to the provider URL.discover boolDefault:''
function wp_oembed_get( $url, $args = '' ) {
$oembed = _wp_oembed_get_object();
return $oembed->get_html( $url, $args );
}
| Version | Description |
|---|---|
| 2.9.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_oembed_get