embed_html
Filters the embed HTML output for a given post.
Использование
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(строка)
- 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.
Список изменений
| С версии 4.4.0 | Введена. |
Где вызывается хук
embed_html
wp-includes/embed.php 547
return apply_filters( 'embed_html', $output, $post, $width, $height );