WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
615 | * Filters whether to show the site icons in toolbar. |
616 | * |
617 | * Returning false to this hook is the recommended way to hide site icons in the toolbar. |
618 | * A truthy return may have negative performance impact on large multisites. |
619 | * |
620 | * @since 6.0.0 |
621 | * |
622 | * @param bool $show_site_icons Whether site icons should be shown in the toolbar. Default true. |
623 | */ |
624 | $show_site_icons = apply_filters( 'wp_admin_bar_show_site_icons', true ); |
625 |
|
626 | foreach ( (array) $wp_admin_bar->user->blogs as $blog ) { |
627 | switch_to_blog( $blog->userblog_id ); |
628 |
|
629 | if ( true === $show_site_icons && has_site_icon() ) { |
630 | $blavatar = sprintf( |
631 | '<img class="blavatar" src="%s" srcset="%s 2x" alt="" width="16" height="16"%s />', |
632 | esc_url( get_site_icon_url( 16 ) ), |
633 | esc_url( get_site_icon_url( 32 ) ), |