wpcf7_add_form_tag

The Contact Form 7 wpcf7 add form tag function.

Description

wpcf7_add_form_tag( $tag, $func, (string) $features = '' ); 

Parameters (3)

0. $tag
The tag.
1. $func
The func.
2. $features — Optional. (string) => ''
The features.

Usage

  1. if ( !function_exists( 'wpcf7_add_form_tag' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'contact-form-7/includes/form-tags-manager.php'; 
  3.  
  4. // The tag. 
  5. $tag = null; 
  6.  
  7. // The func. 
  8. $func = null; 
  9.  
  10. // The features. 
  11. $features = ''; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = wpcf7_add_form_tag($tag, $func, $features); 
  15.  

Defined (1)

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

/includes/form-tags-manager.php  
  1. function wpcf7_add_form_tag( $tag, $func, $features = '' ) { 
  2. $manager = WPCF7_FormTagsManager::get_instance(); 
  3.  
  4. return $manager->add( $tag, $func, $features );