Code Duplication    Length = 6-6 lines in 2 locations

projects/plugins/jetpack/modules/masterbar/admin-menu/class-admin-menu.php 2 locations

@@ 514-519 (lines=6) @@
511
			add_submenu_page( $appearance_slug, esc_attr__( 'Background', 'jetpack' ), __( 'Background', 'jetpack' ), $appearance_cap, esc_url( $customize_background_url ), null, 20 );
512
		}
513
514
		if ( current_theme_supports( 'widgets' ) ) {
515
			remove_submenu_page( 'themes.php', 'widgets.php' );
516
517
			$customize_menu_url = add_query_arg( array( 'autofocus' => array( 'panel' => 'widgets' ) ), $appearance_slug );
518
			add_submenu_page( $appearance_slug, esc_attr__( 'Widgets', 'jetpack' ), __( 'Widgets', 'jetpack' ), $appearance_cap, esc_url( $customize_menu_url ), null, 20 );
519
		}
520
521
		if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) {
522
			remove_submenu_page( 'themes.php', 'nav-menus.php' );
@@ 521-526 (lines=6) @@
518
			add_submenu_page( $appearance_slug, esc_attr__( 'Widgets', 'jetpack' ), __( 'Widgets', 'jetpack' ), $appearance_cap, esc_url( $customize_menu_url ), null, 20 );
519
		}
520
521
		if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) {
522
			remove_submenu_page( 'themes.php', 'nav-menus.php' );
523
524
			$customize_menu_url = add_query_arg( array( 'autofocus' => array( 'panel' => 'nav_menus' ) ), $appearance_slug );
525
			add_submenu_page( $appearance_slug, esc_attr__( 'Menus', 'jetpack' ), __( 'Menus', 'jetpack' ), $appearance_cap, esc_url( $customize_menu_url ), null, 20 );
526
		}
527
528
		$this->migrate_submenus( 'themes.php', $appearance_slug );
529
	}