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
1052           /**
1053            * Filters the list of custom logo image attributes.
1054            *
1055            * @since 5.5.0
1056            *
1057            * @param array $custom_logo_attr Custom logo image attributes.
1058            * @param int   $custom_logo_id   Custom logo attachment ID.
1059            * @param int   $blog_id          ID of the blog to get the custom logo for.
1060            */
1061           $custom_logo_attr = apply_filters( 'get_custom_logo_image_attributes', $custom_logo_attr, $custom_logo_id, $blog_id );
1062
1063           /*
1064            * If the alt attribute is not empty, there's no need to explicitly pass it
1065            * because wp_get_attachment_image() already adds the alt attribute.
1066            */
1067           $image = wp_get_attachment_image( $custom_logo_id, 'full', false, $custom_logo_attr );
1068
1069           if ( $unlink_homepage_logo && is_front_page() && ! is_paged() ) {
1070                // If on the home page, don't link the logo to home.