Code Duplication    Length = 2-2 lines in 3 locations

src/wp-includes/admin-bar.php 3 locations

@@ 695-696 (lines=2) @@
692
693
	$cpts = (array) get_post_types( array( 'show_in_admin_bar' => true ), 'objects' );
694
695
	if ( isset( $cpts['post'] ) && current_user_can( $cpts['post']->cap->create_posts ) )
696
		$actions[ 'post-new.php' ] = array( $cpts['post']->labels->name_admin_bar, 'new-post' );
697
698
	if ( isset( $cpts['attachment'] ) && current_user_can( 'upload_files' ) )
699
		$actions[ 'media-new.php' ] = array( $cpts['attachment']->labels->name_admin_bar, 'new-media' );
@@ 698-699 (lines=2) @@
695
	if ( isset( $cpts['post'] ) && current_user_can( $cpts['post']->cap->create_posts ) )
696
		$actions[ 'post-new.php' ] = array( $cpts['post']->labels->name_admin_bar, 'new-post' );
697
698
	if ( isset( $cpts['attachment'] ) && current_user_can( 'upload_files' ) )
699
		$actions[ 'media-new.php' ] = array( $cpts['attachment']->labels->name_admin_bar, 'new-media' );
700
701
	if ( current_user_can( 'manage_links' ) )
702
		$actions[ 'link-add.php' ] = array( _x( 'Link', 'add new from admin bar' ), 'new-link' );
@@ 704-705 (lines=2) @@
701
	if ( current_user_can( 'manage_links' ) )
702
		$actions[ 'link-add.php' ] = array( _x( 'Link', 'add new from admin bar' ), 'new-link' );
703
704
	if ( isset( $cpts['page'] ) && current_user_can( $cpts['page']->cap->create_posts ) )
705
		$actions[ 'post-new.php?post_type=page' ] = array( $cpts['page']->labels->name_admin_bar, 'new-page' );
706
707
	unset( $cpts['post'], $cpts['page'], $cpts['attachment'] );
708