manage_taxonomies_for_attachment_columns

Filters the taxonomy columns for attachments in the Media list table.

Description

apply_filters( 'manage_taxonomies_for_attachment_columns', (array) $taxonomies, (string) $attachment ); 

Parameters (2)

0. $taxonomies (array)
An array of registered taxonomies to show for attachments.
1. $attachment (string) => 'attachment'
The post type. Default attachment..

Usage

To run the hook, copy the example below.
  1. $taxonomies = apply_filters( 'manage_taxonomies_for_attachment_columns', $taxonomies, $attachment ); 
  2.  
  3. if ( !empty( $taxonomies ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the manage_taxonomies_for_attachment_columns callback 
  2. function filter_manage_taxonomies_for_attachment_columns( $taxonomies, $attachment ) { 
  3. // make filter magic happen here... 
  4. return $taxonomies
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'manage_taxonomies_for_attachment_columns', 'filter_manage_taxonomies_for_attachment_columns', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'manage_taxonomies_for_attachment_columns', 'filter_manage_taxonomies_for_attachment_columns', 10, 2 ); 

Defined (1)

The filter is defined in the following location(s).

/wp-admin/includes/class-wp-media-list-table.php  
  1. $taxonomies = apply_filters( 'manage_taxonomies_for_attachment_columns', $taxonomies, 'attachment' );