Code Duplication    Length = 8-8 lines in 5 locations

src/wp-includes/admin-bar.php 5 locations

@@ 455-462 (lines=8) @@
452
			'href'   => network_admin_url(),
453
		) );
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(
@@ 464-471 (lines=8) @@
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(
@@ 473-480 (lines=8) @@
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(
@@ 482-489 (lines=8) @@
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(
@@ 491-498 (lines=8) @@
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
		}
499
	}
500
501
	// Add site links