manage_taxonomies_for_<post_type>_columns

Filters the taxonomy columns in the Posts list table.

Description

apply_filters( 'manage_taxonomies_for_<post_type>_columns', (array) $taxonomies, (string) $post_type ); 

The dynamic portion(s) of the hook name refer to the post type slug.

Parameters (2)

0. $taxonomies (array)
Array of taxonomies to show columns for.
1. $post_type (string)
The post type.

Usage

To run the hook, copy the example below.
  1. $taxonomies = apply_filters( 'manage_taxonomies_for_{$post_type}_columns', $taxonomies, $post_type ); 
  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_<post_type>_columns callback 
  2. function filter_manage_taxonomies_for_post_type_columns( $taxonomies, $post_type ) { 
  3. // make filter magic happen here... 
  4. return $taxonomies
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( "manage_taxonomies_for_{$post_type}_columns", 'filter_manage_taxonomies_for_post_type_columns', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( "manage_taxonomies_for_{$post_type}_columns", 'filter_manage_taxonomies_for_post_type_columns', 10, 2 ); 

Defined (1)

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

/wp-admin/includes/class-wp-posts-list-table.php  
  1. $taxonomies = apply_filters( "manage_taxonomies_for_{$post_type}_columns", $taxonomies, $post_type );