wpseo_primary_term_taxonomies

Filters which taxonomies for which the user can choose the primary term.

Description

apply_filters( 'wpseo_primary_term_taxonomies', (unknown) $all_taxonomies, (unknown) $post_type, (unknown) $all_taxonomies ); 

Parameters (3)

0. $all_taxonomies (unknown)
The all taxonomies.
1. $post_type (unknown)
The post type.
2. $all_taxonomies (unknown)
The all taxonomies.

Usage

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

Defined (1)

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

/admin/class-primary-term-admin.php  
  1. $taxonomies = (array) apply_filters( 'wpseo_primary_term_taxonomies', $all_taxonomies, $post_type, $all_taxonomies );