wp_admin_bar_show_site_icons
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.
Использование
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.
По умолчанию: true
Список изменений
| С версии 6.0.0 | Введена. |
Где вызывается хук
wp_admin_bar_show_site_icons
wp-includes/admin-bar.php 678
$show_site_icons = apply_filters( 'wp_admin_bar_show_site_icons', true );