get_header_image_tag filter-hookWP 4.4.0

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()
get_header_image_tag
wp-includes/theme.php 1274
return apply_filters( 'get_header_image_tag', $html, $header, $attr );

Where the hook is used in WordPress

Usage not found.