get_header_image_tag хук-фильтрWP 4.4.0

Filters the markup of header images.

Использование

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(строка)
The HTML image tag markup being filtered.
$header(объект)
The custom header object returned by 'get_custom_header()'.
$attr(массив)
Array of the attributes for the image tag.

Список изменений

С версии 4.4.0 Введена.

Где вызывается хук

get_header_image_tag()
get_header_image_tag
wp-includes/theme.php 1337
return apply_filters( 'get_header_image_tag', $html, $header, $attr );

Где используется хук в WordPress

Использование не найдено.