cf_custom_fields_is_featured_image_field

Check if field is the featured image field.

Description

cf_custom_fields_is_featured_image_field( (array) $field, (array) $form ); 

Parameters (2)

0. $field (array)
Field config
1. $form (array)
Form config

Usage

  1. if ( !function_exists( 'cf_custom_fields_is_featured_image_field' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'caldera-custom-fields/includes/to-post-type.php'; 
  3.  
  4. // Field config 
  5. $field = array(); 
  6.  
  7. // Form config 
  8. $form = array(); 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = cf_custom_fields_is_featured_image_field($field, $form); 
  12.  

Defined (1)

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

/includes/to-post-type.php  
  1. function cf_custom_fields_is_featured_image_field( $field, $form ) { 
  2. $has = Caldera_Forms::get_processor_by_type( 'post_type', $form ); 
  3. if( $has && $field[ 'ID' ] == $has[0]['config'][ 'featured_image'] ) { 
  4. return true; 
  5.  
  6. return false;