On this page
apply_filters( 'oembed_result', string|false $data, string $url, string|array $args )
Filters the HTML returned by the oEmbed provider.
Parameters
$datastring|false-
The returned oEmbed HTML (false if unsafe).
$urlstring-
URL of the content to be embedded.
$argsstring|array-
Additional arguments for retrieving embed HTML.
See wp_oembed_get() for accepted arguments. Default empty.More Arguments from wp_oembed_get( ... $args )
Additional arguments for retrieving embed HTML.
widthint|stringOptional. Themaxwidthvalue passed to the provider URL.heightint|stringOptional. Themaxheightvalue passed to the provider URL.discoverboolOptional. Determines whether to attempt to discover link tags at the given URL for an oEmbed provider when the provider URL is not found in the built-in providers list. Default true.
Source
File: wp-includes/class-wp-oembed.php. View all references
return apply_filters( 'oembed_result', $this->data2html( $data, $url ), $url, $args );
Related
Used By
| Used By | Description |
|---|---|
| WP_oEmbed_Controller::get_proxy_item() wp-includes/class-wp-oembed-controller.php | Callback for the proxy API endpoint. |
| WP_oEmbed::get_html() wp-includes/class-wp-oembed.php | The do-it-all function that takes a URL and attempts to return the HTML. |
Changelog
| Version | Description |
|---|---|
| 2.9.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/oembed_result