/**
* @return string[] Array of column titles keyed by their column name.
*/
public function get_columns() { $posts_columns = array
();
$posts_columns['cb'
] = '<input type="checkbox" />';
/* translators: Column name. */
$posts_columns['title'
] =
_x( 'File', 'column name'
);
$posts_columns['author'
] =
__( 'Author'
);
$taxonomies =
get_taxonomies_for_attachments( 'objects'
);
$taxonomies =
wp_filter_object_list( $taxonomies, array
( 'show_admin_column' => true
), 'and', 'name'
);
/**
* Filters the taxonomy columns for attachments in the Media list table.
*
* @since 3.5.0
*
* @param string[] $taxonomies An array of registered taxonomy names to show for attachments.
* @param string $post_type The post type. Default 'attachment'.
*/
$taxonomies =
apply_filters( 'manage_taxonomies_for_attachment_columns',
$taxonomies, 'attachment'
);
$taxonomies =
array_filter( $taxonomies, 'taxonomy_exists'
);