wpcf7_strip_quote

The Contact Form 7 wpcf7 strip quote function.

Description

wpcf7_strip_quote( $text ); 

Parameters (1)

0. $text
The text.

Usage

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

Defined (1)

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

/includes/formatting.php  
  1. function wpcf7_strip_quote( $text ) { 
  2. $text = trim( $text ); 
  3.  
  4. if ( preg_match( '/^"(.*)"$/s', $text, $matches ) ) { 
  5. $text = $matches[1]; 
  6. } elseif ( preg_match( "/^'(.*)'$/s", $text, $matches ) ) { 
  7. $text = $matches[1]; 
  8.  
  9. return $text;