cf_custom_fields_get_taxonomy_fields

Find taxonomy fields and values.

Description

(array) cf_custom_fields_get_taxonomy_fields( $all_fields ); 

Returns (array)

Parameters (1)

0. $all_fields
The all fields.

Usage

  1. if ( !function_exists( 'cf_custom_fields_get_taxonomy_fields' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'caldera-custom-fields/includes/to-post-type.php'; 
  3.  
  4. // The all fields. 
  5. $all_fields = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = cf_custom_fields_get_taxonomy_fields($all_fields); 
  9.  

Defined (2)

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

/includes/to-post-type.php  
  1. function cf_custom_fields_get_taxonomy_fields( $all_fields ) { 
  2. $tax_fields = array(); 
  3. foreach( $all_fields as $field => $value ) { 
  4. if( false !== strpos( $field, 'cf-custom-fields-tax-') ) { 
  5. if ( ! empty( $value ) ) { 
  6. $tax_fields[ $field ] = array( 
  7. 'taxonomy' => str_replace( 'cf-custom-fields-tax-', '', $field ),  
  8. 'terms' => Caldera_Forms::do_magic_tags( $value ) 
  9. ); 
  10.  
  11. return $tax_fields; 
  1. function cf_custom_fields_get_taxonomy_fields( $all_fields ) { 
  2. $tax_fields = array(); 
  3. foreach( $all_fields as $field => $value ) { 
  4. if( false !== strpos( $field, 'cf-custom-fields-tax-') ) { 
  5. if ( ! empty( $value ) ) { 
  6. $tax_fields[ $field ] = array( 
  7. 'taxonomy' => str_replace( 'cf-custom-fields-tax-', '', $field ),  
  8. 'terms' => Caldera_Forms::do_magic_tags( $value ) 
  9. ); 
  10.  
  11. return $tax_fields;