Code Duplication    Length = 2-2 lines in 3 locations

wp-includes/admin-bar.php 3 locations

@@ 631-632 (lines=2) @@
628
629
	$cpts = (array) get_post_types( array( 'show_in_admin_bar' => true ), 'objects' );
630
631
	if ( isset( $cpts['post'] ) && current_user_can( $cpts['post']->cap->create_posts ) )
632
		$actions[ 'post-new.php' ] = array( $cpts['post']->labels->name_admin_bar, 'new-post' );
633
634
	if ( isset( $cpts['attachment'] ) && current_user_can( 'upload_files' ) )
635
		$actions[ 'media-new.php' ] = array( $cpts['attachment']->labels->name_admin_bar, 'new-media' );
@@ 634-635 (lines=2) @@
631
	if ( isset( $cpts['post'] ) && current_user_can( $cpts['post']->cap->create_posts ) )
632
		$actions[ 'post-new.php' ] = array( $cpts['post']->labels->name_admin_bar, 'new-post' );
633
634
	if ( isset( $cpts['attachment'] ) && current_user_can( 'upload_files' ) )
635
		$actions[ 'media-new.php' ] = array( $cpts['attachment']->labels->name_admin_bar, 'new-media' );
636
637
	if ( current_user_can( 'manage_links' ) )
638
		$actions[ 'link-add.php' ] = array( _x( 'Link', 'add new from admin bar' ), 'new-link' );
@@ 640-641 (lines=2) @@
637
	if ( current_user_can( 'manage_links' ) )
638
		$actions[ 'link-add.php' ] = array( _x( 'Link', 'add new from admin bar' ), 'new-link' );
639
640
	if ( isset( $cpts['page'] ) && current_user_can( $cpts['page']->cap->create_posts ) )
641
		$actions[ 'post-new.php?post_type=page' ] = array( $cpts['page']->labels->name_admin_bar, 'new-page' );
642
643
	unset( $cpts['post'], $cpts['page'], $cpts['attachment'] );
644