acf/get_taxonomies_for_select

The Advanced Custom Fields acf get taxonomies for select hook.

Description

apply_filters( 'acf/get_taxonomies_for_select', (unknown) $choices, (unknown) $simple_value ); 

Parameters (2)

0. $choices (unknown)
The choices.
1. $simple_value (unknown)
The simple value.

Usage

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

Defined (3)

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

/core/fields/relationship.php  
  1. $choices = apply_filters('acf/get_taxonomies_for_select', $choices, $simple_value); 
/core/fields/post_object.php  
  1. $choices = apply_filters('acf/get_taxonomies_for_select', $choices, $simple_value); 
/core/controllers/field_group.php  
  1. $choices = apply_filters('acf/get_taxonomies_for_select', $choices, $simple_value);