Takes a URL and attempts to return the oEmbed data.
$urlstringrequired
$argsstring|arrayoptional
width int|stringmaxwidth value passed to the provider URL.height int|stringmaxheight value passed to the provider URL.discover boolDefault:''
public function get_data( $url, $args = '' ) {
$args = wp_parse_args( $args );
$provider = $this->get_provider( $url, $args );
if ( ! $provider ) {
return false;
}
$data = $this->fetch( $provider, $url, $args );
if ( false === $data ) {
return false;
}
return $data;
}
| Version | Description |
|---|---|
| 4.8.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_oembed/get_data