Code Duplication    Length = 6-6 lines in 2 locations

modules/masterbar/admin-menu/class-admin-menu.php 2 locations

@@ 487-492 (lines=6) @@
484
			add_submenu_page( $appearance_slug, esc_attr__( 'Background', 'jetpack' ), __( 'Background', 'jetpack' ), $appearance_cap, esc_url( $customize_background_url ), null, 20 );
485
		}
486
487
		if ( current_theme_supports( 'widgets' ) ) {
488
			remove_submenu_page( 'themes.php', 'widgets.php' );
489
490
			$customize_menu_url = add_query_arg( array( 'autofocus' => array( 'panel' => 'widgets' ) ), $appearance_slug );
491
			add_submenu_page( $appearance_slug, esc_attr__( 'Widgets', 'jetpack' ), __( 'Widgets', 'jetpack' ), $appearance_cap, esc_url( $customize_menu_url ), null, 20 );
492
		}
493
494
		if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) {
495
			remove_submenu_page( 'themes.php', 'nav-menus.php' );
@@ 494-499 (lines=6) @@
491
			add_submenu_page( $appearance_slug, esc_attr__( 'Widgets', 'jetpack' ), __( 'Widgets', 'jetpack' ), $appearance_cap, esc_url( $customize_menu_url ), null, 20 );
492
		}
493
494
		if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) {
495
			remove_submenu_page( 'themes.php', 'nav-menus.php' );
496
497
			$customize_menu_url = add_query_arg( array( 'autofocus' => array( 'panel' => 'nav_menus' ) ), $appearance_slug );
498
			add_submenu_page( $appearance_slug, esc_attr__( 'Menus', 'jetpack' ), __( 'Menus', 'jetpack' ), $appearance_cap, esc_url( $customize_menu_url ), null, 20 );
499
		}
500
501
		$this->migrate_submenus( 'themes.php', $appearance_slug );
502
	}