wppaste
WordPress

apply_filters( 'get_custom_logo_image_attributes', array $custom_logo_attr, int $custom_logo_id, int $blog_id )

Since
5.5.0
Filters the list of custom logo image attributes.

Compatibility

WordPress
since 5.5.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$custom_logo_attrarray
Custom logo image attributes.
$custom_logo_idint
Custom logo attachment ID.
$blog_idint
ID of the blog to get the custom logo for.

Where this hook fires · 1

  • wp-includes/general-template.php:1103get_custom_logo()

Source code

		 * @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.		 */		$image = wp_get_attachment_image( $custom_logo_id, 'full', false, $custom_logo_attr );

Changelog

Introduced in 5.5.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.9.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.