wpcf7_sanitize_unit_tag

The Contact Form 7 wpcf7 sanitize unit tag function.

Description

wpcf7_sanitize_unit_tag( $tag ); 

Parameters (1)

0. $tag
The tag.

Usage

  1. if ( !function_exists( 'wpcf7_sanitize_unit_tag' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'contact-form-7/includes/formatting.php'; 
  3.  
  4. // The tag. 
  5. $tag = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wpcf7_sanitize_unit_tag($tag); 
  9.  

Defined (1)

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

/includes/formatting.php  
  1. function wpcf7_sanitize_unit_tag( $tag ) { 
  2. $tag = preg_replace( '/[^A-Za-z0-9_-]/', '', $tag ); 
  3. return $tag;