Code Duplication    Length = 6-7 lines in 2 locations

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

@@ 439-445 (lines=7) @@
436
			add_submenu_page( $themes_slug, esc_attr__( 'Background', 'jetpack' ), __( 'Background', 'jetpack' ), 'customize', esc_url( $customize_background_url ), null, 20 );
437
		}
438
439
		if ( current_theme_supports( 'widgets' ) ) {
440
			remove_submenu_page( 'themes.php', 'widgets.php' );
441
			remove_submenu_page( 'themes.php', 'gutenberg-widgets' );
442
443
			$customize_widgets_url = $wp_admin_customize ? 'widgets.php' : add_query_arg( array( 'autofocus' => array( 'panel' => 'widgets' ) ), $customize_slug );
444
			add_submenu_page( $themes_slug, esc_attr__( 'Widgets', 'jetpack' ), __( 'Widgets', 'jetpack' ), 'customize', esc_url( $customize_widgets_url ), null, 20 );
445
		}
446
447
		if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) {
448
			remove_submenu_page( 'themes.php', 'nav-menus.php' );
@@ 447-452 (lines=6) @@
444
			add_submenu_page( $themes_slug, esc_attr__( 'Widgets', 'jetpack' ), __( 'Widgets', 'jetpack' ), 'customize', esc_url( $customize_widgets_url ), null, 20 );
445
		}
446
447
		if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) {
448
			remove_submenu_page( 'themes.php', 'nav-menus.php' );
449
450
			$customize_menus_url = $wp_admin_customize ? 'nav-menus.php' : add_query_arg( array( 'autofocus' => array( 'panel' => 'nav_menus' ) ), $customize_slug );
451
			add_submenu_page( $themes_slug, esc_attr__( 'Menus', 'jetpack' ), __( 'Menus', 'jetpack' ), 'customize', esc_url( $customize_menus_url ), null, 20 );
452
		}
453
454
		// Register menu for the Custom CSS Jetpack module, but don't add it as a menu item.
455
		$GLOBALS['_registered_pages']['admin_page_editcss'] = true; // phpcs:ignore