Code Duplication    Length = 10-10 lines in 2 locations

src/wp-admin/includes/class-wp-media-list-table.php 1 location

@@ 295-304 (lines=10) @@
292
		$taxonomies = apply_filters( 'manage_taxonomies_for_attachment_columns', $taxonomies, 'attachment' );
293
		$taxonomies = array_filter( $taxonomies, 'taxonomy_exists' );
294
295
		foreach ( $taxonomies as $taxonomy ) {
296
			if ( 'category' === $taxonomy ) {
297
				$column_key = 'categories';
298
			} elseif ( 'post_tag' === $taxonomy ) {
299
				$column_key = 'tags';
300
			} else {
301
				$column_key = 'taxonomy-' . $taxonomy;
302
			}
303
			$posts_columns[ $column_key ] = get_taxonomy( $taxonomy )->labels->name;
304
		}
305
306
		/* translators: column name */
307
		if ( !$this->detached ) {

src/wp-admin/includes/class-wp-posts-list-table.php 1 location

@@ 563-572 (lines=10) @@
560
		$taxonomies = apply_filters( "manage_taxonomies_for_{$post_type}_columns", $taxonomies, $post_type );
561
		$taxonomies = array_filter( $taxonomies, 'taxonomy_exists' );
562
563
		foreach ( $taxonomies as $taxonomy ) {
564
			if ( 'category' === $taxonomy )
565
				$column_key = 'categories';
566
			elseif ( 'post_tag' === $taxonomy )
567
				$column_key = 'tags';
568
			else
569
				$column_key = 'taxonomy-' . $taxonomy;
570
571
			$posts_columns[ $column_key ] = get_taxonomy( $taxonomy )->labels->name;
572
		}
573
574
		$post_status = !empty( $_REQUEST['post_status'] ) ? $_REQUEST['post_status'] : 'all';
575
		if ( post_type_supports( $post_type, 'comments' ) && !in_array( $post_status, array( 'pending', 'draft', 'future' ) ) )