454 | | $wp_admin_bar->add_menu( array( |
455 | | 'parent' => 'network-admin', |
456 | | 'id' => 'network-admin-s', |
457 | | 'title' => __( 'Sites' ), |
458 | | 'href' => network_admin_url( 'sites.php' ), |
459 | | ) ); |
460 | | $wp_admin_bar->add_menu( array( |
461 | | 'parent' => 'network-admin', |
462 | | 'id' => 'network-admin-u', |
463 | | 'title' => __( 'Users' ), |
464 | | 'href' => network_admin_url( 'users.php' ), |
465 | | ) ); |
466 | | $wp_admin_bar->add_menu( array( |
467 | | 'parent' => 'network-admin', |
468 | | 'id' => 'network-admin-t', |
469 | | 'title' => __( 'Themes' ), |
470 | | 'href' => network_admin_url( 'themes.php' ), |
471 | | ) ); |
472 | | $wp_admin_bar->add_menu( array( |
473 | | 'parent' => 'network-admin', |
474 | | 'id' => 'network-admin-p', |
475 | | 'title' => __( 'Plugins' ), |
476 | | 'href' => network_admin_url( 'plugins.php' ), |
477 | | ) ); |
478 | | $wp_admin_bar->add_menu( array( |
479 | | 'parent' => 'network-admin', |
480 | | 'id' => 'network-admin-o', |
481 | | 'title' => __( 'Settings' ), |
482 | | 'href' => network_admin_url( 'settings.php' ), |
483 | | ) ); |
| 454 | |
| 455 | if ( current_user_can( 'manage_sites' ) ) { |
| 456 | $wp_admin_bar->add_menu( array( |
| 457 | 'parent' => 'network-admin', |
| 458 | 'id' => 'network-admin-s', |
| 459 | 'title' => __( 'Sites' ), |
| 460 | 'href' => network_admin_url( 'sites.php' ), |
| 461 | ) ); |
| 462 | } |
| 463 | |
| 464 | if ( current_user_can( 'manage_network_users' ) ) { |
| 465 | $wp_admin_bar->add_menu( array( |
| 466 | 'parent' => 'network-admin', |
| 467 | 'id' => 'network-admin-u', |
| 468 | 'title' => __( 'Users' ), |
| 469 | 'href' => network_admin_url( 'users.php' ), |
| 470 | ) ); |
| 471 | } |
| 472 | |
| 473 | if ( current_user_can( 'manage_network_themes' ) ) { |
| 474 | $wp_admin_bar->add_menu( array( |
| 475 | 'parent' => 'network-admin', |
| 476 | 'id' => 'network-admin-t', |
| 477 | 'title' => __( 'Themes' ), |
| 478 | 'href' => network_admin_url( 'themes.php' ), |
| 479 | ) ); |
| 480 | } |
| 481 | |
| 482 | if ( current_user_can( 'manage_network_plugins' ) ) { |
| 483 | $wp_admin_bar->add_menu( array( |
| 484 | 'parent' => 'network-admin', |
| 485 | 'id' => 'network-admin-p', |
| 486 | 'title' => __( 'Plugins' ), |
| 487 | 'href' => network_admin_url( 'plugins.php' ), |
| 488 | ) ); |
| 489 | } |
| 490 | |
| 491 | if ( current_user_can( 'manage_network_options' ) ) { |
| 492 | $wp_admin_bar->add_menu( array( |
| 493 | 'parent' => 'network-admin', |
| 494 | 'id' => 'network-admin-o', |
| 495 | 'title' => __( 'Settings' ), |
| 496 | 'href' => network_admin_url( 'settings.php' ), |
| 497 | ) ); |
| 498 | } |