cf_si_register_processor

Addes the processor to the forms prosessors registry.

Description

cf_si_register_processor( $processors ); 

Parameters (1)

0. $processors
The processors.

Usage

  1. if ( !function_exists( 'cf_si_register_processor' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'caldera-forms-sprout-invoices-integration/cf-sprout-invoice.php'; 
  3.  
  4. // The processors. 
  5. $processors = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = cf_si_register_processor($processors); 
  9.  

Defined (1)

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

/cf-sprout-invoice.php  
  1. function cf_si_register_processor($processors) { 
  2.  
  3. // Estimate creation 
  4. $processors['sprout_invoice'] = array( 
  5. "name" => __('Sprout Invoices', 'cf-sprout'),  
  6. "description" => __("Create an estimate from a form submission.", 'cf-sprout'),  
  7. "icon" => plugin_dir_url(__FILE__) . "img/sproutapps.png",  
  8. "author" => "David Cramer",  
  9. "author_url" => "https://profiles.wordpress.org/desertsnowman",  
  10. "processor" => 'cf_si_process_form_estimate',  
  11. "template" => plugin_dir_path(__FILE__) . "config.php",  
  12. "single" => true,  
  13. "meta_template" => plugin_dir_path(__FILE__) . "meta.php",  
  14. "styles" => array( 
  15. plugin_dir_url(__FILE__) . 'css/meta_style.css' 
  16. ),  
  17. "magic_tags" => array( 
  18. "estimate_id" 
  19. ); 
  20.  
  21. // Just a Client Creation 
  22. $processors['sprout_invoice_client'] = array( 
  23. "name" => __('Sprout Client', 'cf-sprout'),  
  24. "description" => __("Create a Sprout Invoces Client from a form submission.", 'cf-sprout'),  
  25. "icon" => plugin_dir_url(__FILE__) . "img/sproutapps.png",  
  26. "author" => "David Cramer",  
  27. "author_url" => "https://profiles.wordpress.org/desertsnowman",  
  28. "processor" => 'cf_si_process_form_client',  
  29. "template" => plugin_dir_path(__FILE__) . "config-client.php",  
  30. "single" => true 
  31. ); 
  32.  
  33. return $processors; 
  34.