get_custom_logo_image_attributes
Filter HookDescription
Filters the list of custom logo image attributes.Hook Information
File Location |
wp-includes/general-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1103 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$custom_logo_attr
|
Custom logo image attributes. |
int
|
$custom_logo_id
|
Custom logo attachment ID. |
int
|
$blog_id
|
ID of the blog to get the custom logo for. |
Usage Examples
Basic Usage
<?php
// Hook into get_custom_logo_image_attributes
add_filter('get_custom_logo_image_attributes', 'my_custom_filter', 10, 3);
function my_custom_filter($custom_logo_attr, $custom_logo_id, $blog_id) {
// Your custom filtering logic here
return $custom_logo_attr;
}
Source Code Context
wp-includes/general-template.php:1103
- How this hook is used in WordPress core
<?php
1098 *
1099 * @param array $custom_logo_attr Custom logo image attributes.
1100 * @param int $custom_logo_id Custom logo attachment ID.
1101 * @param int $blog_id ID of the blog to get the custom logo for.
1102 */
1103 $custom_logo_attr = apply_filters( 'get_custom_logo_image_attributes', $custom_logo_attr, $custom_logo_id, $blog_id );
1104
1105 /*
1106 * If the alt attribute is not empty, there's no need to explicitly pass it
1107 * because wp_get_attachment_image() already adds the alt attribute.
1108 */
PHP Documentation
<?php
/**
* 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.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-includes/general-template.php
Related Hooks
Related hooks will be displayed here in future updates.