apply_filters( 'oembed_dataparse', string|false $return, object $data, string $url )
- Since
- 2.9.0
Filters the returned oEmbed HTML.
Description
Use this filter to add support for custom data types, or to filter the result.
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
$returnstring|false- The returned oEmbed HTML, or false on failure.
$dataobject- A data object result from an oEmbed provider.
$urlstring- The URL of the content to be embedded.
Where this hook fires · 1
wp-includes/class-wp-oembed.php:798WP_oEmbed::data2html()
Source code
* @since 2.9.0 * * @param string|false $return The returned oEmbed HTML, or false on failure. * @param object $data A data object result from an oEmbed provider. * @param string $url The URL of the content to be embedded. */ return apply_filters( 'oembed_dataparse', $return, $data, $url ); } /** * Strips any new lines from the HTML. * * @since 2.9.0 as strip_scribd_newlines()Changelog
Introduced in 2.9.0. One change between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
6.9.7
Parameter
$return retyped from string to string|false.verified against source2.9.0
Introduced.from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 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.