Customize: Introduce get_custom_logo_image_attributes filter for the list of custom logo image attributes.

Props achbed, dlh, westonruter.
Fixes #36640.

git-svn-id: https://develop.svn.wordpress.org/trunk@48057 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-06-16 11:47:31 +00:00
parent cbc71bb1a1
commit 727249cfc6

View File

@ -974,6 +974,17 @@ function get_custom_logo( $blog_id = 0 ) {
$custom_logo_attr['alt'] = get_bloginfo( 'name', 'display' );
}
/**
* Filters the list of custom logo image attributes.
*
* @since 5.5.0
*
* @param array $custom_logo_attr Custom logo image attributes.
* @param int $custom_logo_id Custom logo attachment ID.
* @param int $blog_id ID of the blog to get the custom logo for.
*/
$custom_logo_attr = apply_filters( 'get_custom_logo_image_attributes', $custom_logo_attr, $custom_logo_id, $blog_id );
/*
* If the alt attribute is not empty, there's no need to explicitly pass it
* because wp_get_attachment_image() already adds the alt attribute.