cf_custom_fields_taxonomy_ui

The Caldera Custom Fields cf custom fields taxonomy ui function.

Description

cf_custom_fields_taxonomy_ui(); 

Usage

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

Defined (1)

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

/includes/to-post-type.php  
  1. function cf_custom_fields_taxonomy_ui() { 
  2. $taxonomies = get_taxonomies( array(), 'objects' ); 
  3. $fields = array(); 
  4. $args = array( 
  5. 'magic' => true,  
  6. 'block' => true,  
  7. 'type' => 'text',  
  8. ); 
  9. foreach( $taxonomies as $taxonomy => $obj ) { 
  10. $args[ 'id' ] = 'cf-custom-fields-tax-' . $taxonomy; 
  11. $args[ 'label' ] = $obj->labels->singular_name; 
  12. $args[ 'extra_classes' ] = $taxonomy; 
  13. $fields[] = Caldera_Forms_Processor_UI::config_field( $args ); 
  14.  
  15. return implode( "\n\n", $fields );