get_form_id

Get contact form 7 id.

Description

get_form_id( $cf7 ); 

Back compat for CF7 3.9

Parameters (1)

0. $cf7
Contact Form 7 object

Usage

  1. if ( !function_exists( 'get_form_id' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'contact-form-7-style/cf7-style.php'; 
  3.  
  4. // Contact Form 7 object 
  5. $cf7 = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = get_form_id($cf7); 
  9.  

Defined (1)

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

/cf7-style.php  
  1. function get_form_id( $cf7 ) { 
  2. if ( version_compare( WPCF7_VERSION, '3.9-alpha', '>' ) ) { 
  3. if (!is_object($cf7)) { 
  4. return false; 
  5. return $cf7->id();