get_header_image_tag_attributes
Filters the list of header image attributes.
Использование
add_filter( 'get_header_image_tag_attributes', 'wp_kama_get_header_image_tag_attributes_filter', 10, 2 ); /** * Function for `get_header_image_tag_attributes` filter-hook. * * @param array $attr Array of the attributes for the image tag. * @param object $header The custom header object returned by 'get_custom_header()'. * * @return array */ function wp_kama_get_header_image_tag_attributes_filter( $attr, $header ){ // filter... return $attr; }
- $attr(массив)
- Array of the attributes for the image tag.
- $header(объект)
- The custom header object returned by 'get_custom_header()'.
Список изменений
С версии 5.9.0 | Введена. |
Где вызывается хук
get_header_image_tag_attributes
wp-includes/theme.php 1317
$attr = apply_filters( 'get_header_image_tag_attributes', $attr, $header );