build_processor_types

The Caldera Forms build processor types function.

Description

build_processor_types( (constant) $default = null ); 

Parameters (1)

0. $default — Optional. (constant) => null
The default.

Usage

  1. if ( !function_exists( 'build_processor_types' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'caldera-forms/ui/panels/processors.php'; 
  3.  
  4. // The default. 
  5. $default = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = build_processor_types($default); 
  9.  

Defined (1)

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

/ui/panels/processors.php  
  1. function build_processor_types($default = null) { 
  2. global $form_processors; 
  3.  
  4. $out = ''; 
  5. if(null === $default) { 
  6. $out .= '<option></option>'; 
  7. foreach($form_processors as $processor=>$config) { 
  8. $sel = ""; 
  9. if($default == $processor) { 
  10. $sel = 'selected="selected"'; 
  11. $out .= "<option value=\"". $processor . "\" ". $sel .">" . $config['name'] . "</option>\r\n"; 
  12.  
  13.  
  14. return $out; 
  15.