wpcf7_flamingo_serial_number

The Contact Form 7 wpcf7 flamingo serial number function.

Description

wpcf7_flamingo_serial_number( $output, (string) $name, $html ); 

Parameters (3)

0. $output
The output.
1. $name (string)
The name.
2. $html
The html.

Usage

  1. if ( !function_exists( 'wpcf7_flamingo_serial_number' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'contact-form-7/modules/flamingo.php'; 
  3.  
  4. // The output. 
  5. $output = null; 
  6.  
  7. // The name. 
  8. $name = ''; 
  9.  
  10. // The html. 
  11. $html = null; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = wpcf7_flamingo_serial_number($output, $name, $html); 
  15.  

Defined (1)

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

/modules/flamingo.php  
  1. function wpcf7_flamingo_serial_number( $output, $name, $html ) { 
  2. if ( '_serial_number' != $name ) { 
  3. return $output; 
  4.  
  5. if ( ! class_exists( 'Flamingo_Inbound_Message' ) 
  6. || ! method_exists( 'Flamingo_Inbound_Message', 'count' ) ) { 
  7. return $output; 
  8.  
  9. if ( ! $contact_form = WPCF7_ContactForm::get_current() ) { 
  10. return $output; 
  11.  
  12. $channel_id = wpcf7_flamingo_add_channel
  13. $contact_form->name(), $contact_form->title() ); 
  14.  
  15. if ( $channel_id ) { 
  16. return 1 + (int) Flamingo_Inbound_Message::count( 
  17. array( 'channel_id' => $channel_id ) ); 
  18.  
  19. return 0;