embed_handler_html
Filters the returned embed HTML.
Использование
add_filter( 'embed_handler_html', 'wp_kama_embed_handler_html_filter', 10, 3 );
/**
* Function for `embed_handler_html` filter-hook.
*
* @param string $return The HTML result of the shortcode.
* @param string $url The embed URL.
* @param array $attr An array of shortcode attributes.
*
* @return string
*/
function wp_kama_embed_handler_html_filter( $return, $url, $attr ){
// filter...
return $return;
}
- $return(строка)
- The HTML result of the shortcode.
- $url(строка)
- The embed URL.
- $attr(массив)
- An array of shortcode attributes.
Список изменений
| С версии 2.9.0 | Введена. |
Где вызывается хук
embed_handler_html
wp-includes/class-wp-embed.php 170
return apply_filters( 'embed_handler_html', $return, $url, $attr );