get_header_image_tag_attributes
Filters the list of header image attributes.
Usage
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)
- Array of the attributes for the image tag.
- $header(object)
- The custom header object returned by 'get_custom_header()'.
Changelog
| Since 5.9.0 | Introduced. |
Where the hook is called
get_header_image_tag_attributes
wp-includes/theme.php 1353
$attr = apply_filters( 'get_header_image_tag_attributes', $attr, $header );