Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: manage_taxonomies_for_attachment_columns

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
280
281           /**
282            * Filters the taxonomy columns for attachments in the Media list table.
283            *
284            * @since 3.5.0
285            *
286            * @param array  $taxonomies An array of registered taxonomies to show for attachments.
287            * @param string $post_type  The post type. Default 'attachment'.
288            */
289           $taxonomies = apply_filters( 'manage_taxonomies_for_attachment_columns', $taxonomies, 'attachment' );
290           $taxonomies = array_filter( $taxonomies, 'taxonomy_exists' );
291
292           foreach ( $taxonomies as $taxonomy ) {
293                if ( 'category' === $taxonomy ) {
294                     $column_key = 'categories';
295                } elseif ( 'post_tag' === $taxonomy ) {
296                     $column_key = 'tags';
297                } else {
298                     $column_key = 'taxonomy-' . $taxonomy;