Code Duplication    Length = 6-7 lines in 2 locations

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

@@ 454-460 (lines=7) @@
451
			add_submenu_page( $themes_slug, esc_attr__( 'Background', 'jetpack' ), __( 'Background', 'jetpack' ), 'customize', esc_url( $customize_background_url ), null, 20 );
452
		}
453
454
		if ( current_theme_supports( 'widgets' ) ) {
455
			remove_submenu_page( 'themes.php', 'widgets.php' );
456
			remove_submenu_page( 'themes.php', 'gutenberg-widgets' );
457
458
			$customize_widgets_url = $wp_admin_customize ? 'widgets.php' : add_query_arg( array( 'autofocus' => array( 'panel' => 'widgets' ) ), $customize_slug );
459
			add_submenu_page( $themes_slug, esc_attr__( 'Widgets', 'jetpack' ), __( 'Widgets', 'jetpack' ), 'customize', esc_url( $customize_widgets_url ), null, 20 );
460
		}
461
462
		if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) {
463
			remove_submenu_page( 'themes.php', 'nav-menus.php' );
@@ 462-467 (lines=6) @@
459
			add_submenu_page( $themes_slug, esc_attr__( 'Widgets', 'jetpack' ), __( 'Widgets', 'jetpack' ), 'customize', esc_url( $customize_widgets_url ), null, 20 );
460
		}
461
462
		if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) {
463
			remove_submenu_page( 'themes.php', 'nav-menus.php' );
464
465
			$customize_menus_url = $wp_admin_customize ? 'nav-menus.php' : add_query_arg( array( 'autofocus' => array( 'panel' => 'nav_menus' ) ), $customize_slug );
466
			add_submenu_page( $themes_slug, esc_attr__( 'Menus', 'jetpack' ), __( 'Menus', 'jetpack' ), 'customize', esc_url( $customize_menus_url ), null, 20 );
467
		}
468
469
		// Register menu for the Custom CSS Jetpack module, but don't add it as a menu item.
470
		$GLOBALS['_registered_pages']['admin_page_editcss'] = true; // phpcs:ignore