embed_html
Filters the embed HTML output for a given post.
Usage
add_filter( 'embed_html', 'wp_kama_embed_html_filter', 10, 4 ); /** * Function for `embed_html` filter-hook. * * @param string $output The default iframe tag to display embedded content. * @param WP_Post $post Current post object. * @param int $width Width of the response. * @param int $height Height of the response. * * @return string */ function wp_kama_embed_html_filter( $output, $post, $width, $height ){ // filter... return $output; }
- $output(string)
- The default iframe tag to display embedded content.
- $post(WP_Post)
- Current post object.
- $width(int)
- Width of the response.
- $height(int)
- Height of the response.
Changelog
Since 4.4.0 | Introduced. |
Where the hook is called
embed_html
wp-includes/embed.php 534
return apply_filters( 'embed_html', $output, $post, $width, $height );