_autop_newline_preservation_helper

Newline preservation help function for wpautop.

Description

(string) _autop_newline_preservation_helper( (array) $matches ); 

Returns (string)

Parameters (1)

0. $matches (array)
Preg_replace_callback matches array

Usage

  1. if ( !function_exists( '_autop_newline_preservation_helper' ) ) { 
  2. require_once ABSPATH . WPINC . '/formatting.php'; 
  3.  
  4. // preg_replace_callback matches array 
  5. $matches = array(); 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = _autop_newline_preservation_helper($matches); 
  9.  

Defined (1)

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

/wp-includes/formatting.php  
  1. function _autop_newline_preservation_helper( $matches ) { 
  2. return str_replace( "\n", "<WPPreserveNewline />", $matches[0] );