wpcf7_strip_newline

The Contact Form 7 wpcf7 strip newline function.

Description

wpcf7_strip_newline( $str ); 

Parameters (1)

0. $str
The str.

Usage

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

Defined (1)

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

/includes/formatting.php  
  1. function wpcf7_strip_newline( $str ) { 
  2. $str = (string) $str; 
  3. $str = str_replace( array( "\r", "\n" ), '', $str ); 
  4. return trim( $str );