apply_filters( 'embed_oembed_html', string $cache, string $url, array $attr, int $post_id )
- Since
- 2.9.0
Filters the cached oEmbed HTML.
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
$cachestring- The cached HTML result, stored in post meta.
$urlstring- The attempted embed URL.
$attrarray- An array of shortcode attributes.
$post_idint- Post ID.
Where this hook fires · 2
wp-includes/class-wp-embed.php:291WP_Embed::shortcode()wp-includes/class-wp-embed.php:374WP_Embed::shortcode()
Source code
* * @param string $cache The cached HTML result, stored in post meta. * @param string $url The attempted embed URL. * @param array $attr An array of shortcode attributes. * @param int $post_id Post ID. */ return apply_filters( 'embed_oembed_html', $cache, $url, $attr, $post_id ); } } /** * Filters whether to inspect the given URL for discoverable link tags. *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.8.8
Parameter
$cache retyped from string|false to string.verified against source2.9.0
Introduced.from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 6.9.7 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.