Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 447-453 (lines=7) @@
444
		add_submenu_page( $appearance_slug, esc_attr__( 'Customize', 'jetpack' ), __( 'Customize', 'jetpack' ), 'customize', $customize_slug, null, 5 );
445
		add_submenu_page( $appearance_slug, esc_attr__( 'Themes', 'jetpack' ), __( 'Themes', 'jetpack' ), 'switch_themes', $themes_slug, null, 10 );
446
447
		if ( current_theme_supports( 'custom-header' ) && $user_can_customize ) {
448
			$customize_header_url = add_query_arg( array( 'autofocus' => array( 'control' => 'header_image' ) ), $customize_url );
449
			remove_submenu_page( 'themes.php', $customize_header_url );
450
451
			$customize_header_url = add_query_arg( array( 'autofocus' => array( 'control' => 'header_image' ) ), $appearance_slug );
452
			add_submenu_page( $appearance_slug, __( 'Header', 'jetpack' ), __( 'Header', 'jetpack' ), $appearance_cap, esc_url( $customize_header_url ), null, 15 );
453
		}
454
455
		if ( current_theme_supports( 'custom-background' ) && $user_can_customize ) {
456
			$customize_background_url = add_query_arg( array( 'autofocus' => array( 'control' => 'background_image' ) ), $customize_url );
@@ 455-461 (lines=7) @@
452
			add_submenu_page( $appearance_slug, __( 'Header', 'jetpack' ), __( 'Header', 'jetpack' ), $appearance_cap, esc_url( $customize_header_url ), null, 15 );
453
		}
454
455
		if ( current_theme_supports( 'custom-background' ) && $user_can_customize ) {
456
			$customize_background_url = add_query_arg( array( 'autofocus' => array( 'control' => 'background_image' ) ), $customize_url );
457
			remove_submenu_page( 'themes.php', $customize_background_url );
458
459
			$customize_background_url = add_query_arg( array( 'autofocus' => array( 'control' => 'background_image' ) ), $appearance_slug );
460
			add_submenu_page( $appearance_slug, esc_attr__( 'Background', 'jetpack' ), __( 'Background', 'jetpack' ), $appearance_cap, esc_url( $customize_background_url ), null, 20 );
461
		}
462
463
		if ( current_theme_supports( 'widgets' ) ) {
464
			remove_submenu_page( 'themes.php', 'widgets.php' );