Code Duplication    Length = 2-8 lines in 3 locations

wp-includes/admin-bar.php 3 locations

@@ 719-726 (lines=8) @@
716
function wp_admin_bar_appearance_menu( $wp_admin_bar ) {
717
	$wp_admin_bar->add_group( array( 'parent' => 'site-name', 'id' => 'appearance' ) );
718
719
	if ( current_user_can( 'switch_themes' ) ) {
720
		$wp_admin_bar->add_menu( array(
721
			'parent' => 'appearance',
722
			'id'     => 'themes',
723
			'title'  => __( 'Themes' ),
724
			'href'   => admin_url( 'themes.php' ),
725
		) );
726
	}
727
728
	if ( ! current_user_can( 'edit_theme_options' ) ) {
729
		return;
@@ 732-739 (lines=8) @@
729
		return;
730
	}
731
732
	if ( current_theme_supports( 'widgets' )  ) {
733
		$wp_admin_bar->add_menu( array(
734
			'parent' => 'appearance',
735
			'id'     => 'widgets',
736
			'title'  => __( 'Widgets' ),
737
			'href'   => admin_url( 'widgets.php' ),
738
		) );
739
	}
740
741
	if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) )
742
		$wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'menus', 'title' => __('Menus'), 'href' => admin_url('nav-menus.php') ) );
@@ 741-742 (lines=2) @@
738
		) );
739
	}
740
741
	if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) )
742
		$wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'menus', 'title' => __('Menus'), 'href' => admin_url('nav-menus.php') ) );
743
744
	if ( current_theme_supports( 'custom-background' ) ) {
745
		$wp_admin_bar->add_menu( array(