Code Duplication    Length = 6-6 lines in 2 locations

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

@@ 288-293 (lines=6) @@
285
			add_submenu_page( $themes_slug, esc_attr__( 'Background', 'jetpack' ), __( 'Background', 'jetpack' ), 'customize', esc_url( $customize_background_url ), null, 20 );
286
		}
287
288
		if ( current_theme_supports( 'widgets' ) ) {
289
			remove_submenu_page( 'themes.php', 'widgets.php' );
290
291
			$customize_menu_url = add_query_arg( array( 'autofocus' => array( 'panel' => 'widgets' ) ), $customize_slug );
292
			add_submenu_page( $themes_slug, esc_attr__( 'Widgets', 'jetpack' ), __( 'Widgets', 'jetpack' ), 'customize', esc_url( $customize_menu_url ), null, 20 );
293
		}
294
295
		if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) {
296
			remove_submenu_page( 'themes.php', 'nav-menus.php' );
@@ 295-300 (lines=6) @@
292
			add_submenu_page( $themes_slug, esc_attr__( 'Widgets', 'jetpack' ), __( 'Widgets', 'jetpack' ), 'customize', esc_url( $customize_menu_url ), null, 20 );
293
		}
294
295
		if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) {
296
			remove_submenu_page( 'themes.php', 'nav-menus.php' );
297
298
			$customize_menu_url = add_query_arg( array( 'autofocus' => array( 'panel' => 'nav_menus' ) ), $customize_slug );
299
			add_submenu_page( $themes_slug, esc_attr__( 'Menus', 'jetpack' ), __( 'Menus', 'jetpack' ), 'customize', esc_url( $customize_menu_url ), null, 20 );
300
		}
301
302
		$this->migrate_submenus( 'themes.php', $themes_slug );
303
	}