wp_admin_bar_show_site_icons filter-hookWP 6.0.0

Filters whether to show the site icons in toolbar.

Returning false to this hook is the recommended way to hide site icons in the toolbar. A truthy return may have negative performance impact on large multisites.

Usage

add_filter( 'wp_admin_bar_show_site_icons', 'wp_kama_admin_bar_show_site_icons_filter' );

/**
 * Function for `wp_admin_bar_show_site_icons` filter-hook.
 * 
 * @param bool $show_site_icons Whether site icons should be shown in the toolbar.
 *
 * @return bool
 */
function wp_kama_admin_bar_show_site_icons_filter( $show_site_icons ){

	// filter...
	return $show_site_icons;
}
$show_site_icons(true|false)
Whether site icons should be shown in the toolbar.
Default: true

Changelog

Since 6.0.0 Introduced.

Where the hook is called

wp_admin_bar_my_sites_menu()
wp_admin_bar_show_site_icons
wp-includes/admin-bar.php 624
$show_site_icons = apply_filters( 'wp_admin_bar_show_site_icons', true );

Where the hook is used in WordPress

Usage not found.