This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Display Site ID next to site name | |
| */ | |
| add_action( 'admin_bar_menu', function( $wp_admin_bar ) { | |
| // Check to make sure user is super admin | |
| if ( is_super_admin() ) { | |
| // Get site name node and Blog ID | |
| $site_name_node = $wp_admin_bar->get_node( 'site-name' ); | |
| $blog_id = get_current_blog_id(); |
OlderNewer