wpcf7_add_shortcode

All the functions and classes in this file are deprecated.

Description

wpcf7_add_shortcode( $tag, $func, (bool) $has_name = false ); 

You shouldn't use them. The functions and classes will be removed in a later version.

Parameters (3)

0. $tag
The tag.
1. $func
The func.
2. $has_name — Optional. (bool) => false
The has name.

Usage

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

Defined (1)

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

/includes/shortcodes.php  
  1. function wpcf7_add_shortcode( $tag, $func, $has_name = false ) { 
  2. wpcf7_deprecated_function( __FUNCTION__, '4.6', 'wpcf7_add_form_tag' ); 
  3.  
  4. return wpcf7_add_form_tag( $tag, $func, $has_name );