embed_handler_html
Filters the returned embed HTML.
Usage
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(string|false)
- The HTML result of the shortcode, or false on failure.
- $url(string)
- The embed URL.
- $attr(array)
- An array of shortcode attributes.
Changelog
Since 2.9.0 | Introduced. |
Where the hook is called
embed_handler_html
wp-includes/class-wp-embed.php 170
return apply_filters( 'embed_handler_html', $return, $url, $attr );