cf_custom_fields_metabox_save_form

Disable mailer/ form AJAX/ DB support for metabox forms.

Description

cf_custom_fields_metabox_save_form( $form ); 

Parameters (1)

0. $form
The form.

Usage

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

Defined (2)

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

/includes/metabox.php  
  1. function cf_custom_fields_metabox_save_form($form) { 
  2. if ( isset( $form[ 'processors' ] ) ) { 
  3. foreach ( $form[ 'processors' ] as $processor ) { 
  4. if ( 'cf_asmetabox' == $processor[ 'type' ] ) { 
  5. $form[ 'is_metabox' ] = true; 
  6. // disable DB support 
  7. $form['db_support'] = 0; 
  8.  
  9. // no ajax forms 
  10. if( isset( $form['form_ajax'] ) ) { 
  11. unset( $form['form_ajax'] ); 
  12.  
  13. // disable mailer 
  14. $form['mailer']['enable_mailer'] = 0; 
  15. $form['db_support'] = 0; 
  16. $form['mailer']['enable_mailer'] = 0; 
  17.  
  18. return $form; 
  19.  
  20.  
  21.  
  22. return $form; 
  23.  
  1. function cf_custom_fields_metabox_save_form($form) { 
  2. if ( isset( $form[ 'processors' ] ) ) { 
  3. foreach ( $form[ 'processors' ] as $processor ) { 
  4. if ( 'cf_asmetabox' == $processor[ 'type' ] ) { 
  5. $form[ 'is_metabox' ] = true; 
  6. // disable DB support 
  7. $form['db_support'] = 0; 
  8.  
  9. // no ajax forms 
  10. if( isset( $form['form_ajax'] ) ) { 
  11. unset( $form['form_ajax'] ); 
  12.  
  13. // disable mailer 
  14. $form['mailer']['enable_mailer'] = 0; 
  15. $form['db_support'] = 0; 
  16. $form['mailer']['enable_mailer'] = 0; 
  17.  
  18. return $form; 
  19.  
  20.  
  21.  
  22. return $form; 
  23.