Code Duplication    Length = 6-6 lines in 2 locations

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

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