cf_custom_fields_posttype_process

Register this as a processor.

Description

cf_custom_fields_posttype_process( $processors ); 

Parameters (1)

0. $processors
The processors.

Usage

  1. if ( !function_exists( 'cf_custom_fields_posttype_process' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'caldera-custom-fields/includes/to-post-type.php'; 
  3.  
  4. // The processors. 
  5. $processors = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = cf_custom_fields_posttype_process($processors); 
  9.  

Defined (2)

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

/includes/to-post-type.php  
  1. function cf_custom_fields_posttype_process($processors) { 
  2.  
  3. $processors['post_type'] = array( 
  4. "name" => __( 'Save as Post Type', 'caldera-forms-metabox' ),  
  5. "author" => 'David Cramer',  
  6. "description" => __( 'Store form entries as a post with custom fields.', 'caldera-forms-metabox' ),  
  7. "post_processor" => 'cf_custom_fields_capture_entry',  
  8. "template" => trailingslashit( CCF_PATH ) . "includes/to-post-type-config.php",  
  9. "icon" => CCF_URL . "/post-type.png",  
  10. "default" => array( 
  11. 'post_status' => "draft" 
  12. ),  
  13. "meta_template" => trailingslashit( CCF_PATH ) . "includes/meta_template.php",  
  14. "magic_tags" => array( 
  15. "ID",  
  16. "permalink" 
  17.  
  18. ); 
  19. return $processors; 
  20.  
  1. function cf_custom_fields_posttype_process($processors) { 
  2.  
  3. $processors['post_type'] = array( 
  4. "name" => __( 'Save as Post Type', 'caldera-forms-metabox' ),  
  5. "author" => 'David Cramer',  
  6. "description" => __( 'Store form entries as a post with custom fields.', 'caldera-forms-metabox' ),  
  7. "post_processor" => 'cf_custom_fields_capture_entry',  
  8. "template" => trailingslashit( CCF_PATH ) . "includes/to-post-type-config.php",  
  9. "icon" => CCF_URL . "/post-type.png",  
  10. "default" => array( 
  11. 'post_status' => "draft" 
  12. ),  
  13. "meta_template" => trailingslashit( CCF_PATH ) . "includes/meta_template.php",  
  14. "magic_tags" => array( 
  15. "ID",  
  16. "permalink" 
  17.  
  18. ); 
  19. return $processors; 
  20.