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|false $return The HTML result of the shortcode, or false on failure. * @param string $url The embed URL. * @param array $attr An array of shortcode attributes. * * @return string|false */ function wp_kama_embed_handler_html_filter( $return, $url, $attr ){ // filter... return $return; }
- $return(строка|false)
- The HTML result of the shortcode, or false on failure.
- $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 );