wpcf7_normalize_newline_deep

The Contact Form 7 wpcf7 normalize newline deep function.

Description

wpcf7_normalize_newline_deep( $arr, $to = ' 
' ); 

Parameters (2)

0. $arr
The arr.
1. $to — Optional. (string) => ' '
The to.

Usage

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

Defined (1)

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

/includes/formatting.php  
  1. function wpcf7_normalize_newline_deep( $arr, $to = "\n" ) { 
  2. if ( is_array( $arr ) ) { 
  3. $result = array(); 
  4.  
  5. foreach ( $arr as $key => $text ) { 
  6. $result[$key] = wpcf7_normalize_newline_deep( $text, $to ); 
  7.  
  8. return $result; 
  9.  
  10. return wpcf7_normalize_newline( $arr, $to );