Code Duplication    Length = 6-7 lines in 2 locations

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

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