pll_get_taxonomies

Filter the list of taxonomies available for translation.

Description

apply_filters( 'pll_get_taxonomies', (unknown) $taxonomies, (bool) $true ); 

Parameters (2)

0. $taxonomies (unknown)
The taxonomies.
1. $true (bool) => true
The true.

Usage

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

Defined (2)

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

/settings/settings-cpt.php  
  1. $this->taxonomies = array_unique( apply_filters( 'pll_get_taxonomies', $taxonomies , true ) ); 
/include/model.php  
  1. $taxonomies = apply_filters( 'pll_get_taxonomies', $taxonomies, false );