apply_filters( 'oembed_result', string|false $data, string $url, string|array $args )
- Since
- 2.9.0
Filters the HTML returned by the oEmbed provider.
Compatibility
- WordPress
- since 2.9.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
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.
Where this hook fires · 2
wp-includes/class-wp-oembed-controller.php:226WP_oEmbed_Controller::get_proxy_item()wp-includes/class-wp-oembed.php:424WP_oEmbed::get_html()
Source code
* * @param string|false $data The returned oEmbed HTML (false if unsafe). * @param string $url URL of the content to be embedded. * @param string|array $args Optional. Additional arguments for retrieving embed HTML. * See wp_oembed_get() for accepted arguments. Default empty. */ return apply_filters( 'oembed_result', $this->data2html( $data, $url ), $url, $args ); } /** * Attempts to discover link tags at the given URL for an oEmbed provider. * * @since 2.9.0Changelog
Introduced in 2.9.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.0.4 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.