wpcf7_widget_text_filter

The Contact Form 7 wpcf7 widget text filter function.

Description

wpcf7_widget_text_filter( $content ); 

Parameters (1)

0. $content
The content.

Usage

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

Defined (1)

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

/includes/controller.php  
  1. function wpcf7_widget_text_filter( $content ) { 
  2. $pattern = '/\[[\r\n\t ]*contact-form(-7)?[\r\n\t ].*?\]/'; 
  3.  
  4. if ( ! preg_match( $pattern, $content ) ) { 
  5. return $content; 
  6.  
  7. $content = do_shortcode( $content ); 
  8.  
  9. return $content;