cf_custom_fields_filter_featured_image

Set featured image fields NOT to add to media library since they already are.

Description

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

Parameters (2)

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

Usage

  1. if ( !function_exists( 'cf_custom_fields_filter_featured_image' ) ) { 
  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_filter_featured_image($field, $form); 
  12.  

Defined (1)

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

/includes/to-post-type.php  
  1. function cf_custom_fields_filter_featured_image( $field, $form ) { 
  2. if( cf_custom_fields_is_featured_image_field( $field, $form ) ) { 
  3. $field['config']['media_lib'] = false; 
  4.  
  5. return $field; 
  6.