Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: get_custom_logo_image_attributes

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1094           /**
1095            * Filters the list of custom logo image attributes.
1096            *
1097            * @since 5.5.0
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            */
1109           $image = wp_get_attachment_image( $custom_logo_id, 'full', false, $custom_logo_attr );
1110
1111           // Check that we have a proper HTML img element.
1112           if ( $image ) {