cf7_infusionsoft_addon_save_contact_form

The Contact Form 7 - Infusionsoft Add-on cf7 infusionsoft addon save contact form function.

Description

cf7_infusionsoft_addon_save_contact_form( $contact_form ); 

Parameters (1)

0. $contact_form
The contact form.

Usage

  1. if ( !function_exists( 'cf7_infusionsoft_addon_save_contact_form' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'contact-form-7-infusionsoft-add-on/cf7-infusionsoft-addon.php'; 
  3.  
  4. // The contact form. 
  5. $contact_form = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = cf7_infusionsoft_addon_save_contact_form($contact_form); 
  9.  

Defined (1)

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

/cf7-infusionsoft-addon.php  
  1. function cf7_infusionsoft_addon_save_contact_form( $contact_form ) { 
  2. $contact_form_id = $contact_form->id(); 
  3. if ( !isset( $_POST ) || empty( $_POST ) || !isset( $_POST['cf7_infusionsoft_addon_tags'] ) || !isset( $_POST['cf7_infusionsoft_addon_metaboxes_nonce'] ) ) { 
  4. return; 
  5.  
  6. // Verify that the nonce is valid. 
  7. if ( ! wp_verify_nonce( $_POST['cf7_infusionsoft_addon_metaboxes_nonce'], 'cf7_infusionsoft_addon_metaboxes' ) ) { 
  8. return; 
  9.  
  10. if ( isset( $_POST['cf7_infusionsoft_addon_tags'] ) ) { 
  11. update_post_meta( $contact_form_id,  
  12. '_cf7_infusionsoft_addon_tag_key',  
  13. $_POST['cf7_infusionsoft_addon_tags'] 
  14. );