Many thanx for your code suggestion. It was the “Network Admin” toolbar menu I was trying to change. So this is what I’m using right now.
//* Disable toolbar site name
add_action( 'wp_before_admin_bar_render', 'disable_site_name' );
function disable_site_name() {
global $wp_admin_bar;
if ( is_network_admin() ) {
$wp_admin_bar->remove_menu( 'site-name' );
}
}
//* Enable toolbar network title
add_action( 'admin_bar_menu', 'enable_network_title', 30 );
function enable_network_title() {
global $wp_admin_bar;
if ( is_network_admin() ) {
$wp_admin_bar->add_menu( array(
'id' => 'network-title',
'title' => __('Network Admin'),
'href' => network_admin_url(),
) );
$wp_admin_bar->add_menu( array(
'parent' => 'network-title',
'id' => 'network-sites',
'title' => __( 'All Sites' ),
'href' => network_admin_url( 'sites.php' ),
) );
$wp_admin_bar->add_menu( array(
'parent' => 'network-title',
'id' => 'network-updates',
'title' => __( 'Updates' ),
'href' => network_admin_url( 'update-core.php' ),
) );
$wp_admin_bar->add_menu( array(
'parent' => 'network-title',
'id' => 'network-settings',
'title' => __( 'Settings' ),
'href' => network_admin_url( 'settings.php' ),
) );
}
}
#wpadminbar #wp-admin-bar-network-title>.ab-item:before {
content: '\f319';
font-size: 18px;
position: relative;
top: 3px;
}