caldera_forms_field_js_color_picker_settings

Change settings for color picker fields passed to JavaScript.

Description

apply_filters( 'caldera_forms_field_js_color_picker_settings', (callback) $array, (array) $field, (array) $this_form ); 

Parameters (3)

0. $array — Optional. (callback) => array( 'animationSpeed' => 50, 'animationEasing' => 'swing', 'change' => null, 'changeDelay' => 0, 'control' => 'hue', 'dataUris' =>true, 'defaultValue' => '', 'format' => 'hex', 'hide' => null, 'hideSpeed' => 100, 'inline' => false, 'keywords' => '', 'letterCase' => 'lowercase', 'opacity' => false, 'position' => 'bottom left', 'show' => null, 'showSpeed' => 100, 'theme' => 'default', 'swatches' => array() )
The settings
1. $field (array)
Field config
2. $this_form (array)
The this form.

Usage

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

Defined (1)

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

/classes/field/js.php  
  1. $settings = apply_filters( 'caldera_forms_field_js_color_picker_settings', array(