get_header_image_tag
Filters the markup of header images.
Usage
add_filter( 'get_header_image_tag', 'wp_kama_get_header_image_tag_filter', 10, 3 );
/**
* Function for `get_header_image_tag` filter-hook.
*
* @param string $html The HTML image tag markup being filtered.
* @param object $header The custom header object returned by 'get_custom_header()'.
* @param array $attr Array of the attributes for the image tag.
*
* @return string
*/
function wp_kama_get_header_image_tag_filter( $html, $header, $attr ){
// filter...
return $html;
}
- $html(string)
- The HTML image tag markup being filtered.
- $header(object)
- The custom header object returned by 'get_custom_header()'.
- $attr(array)
- Array of the attributes for the image tag.
Changelog
| Since 4.4.0 | Introduced. |
Where the hook is called
get_header_image_tag
wp-includes/theme.php 1370
return apply_filters( 'get_header_image_tag', $html, $header, $attr );