_autop_newline_preservation_helper

The timeline below displays how wordpress function _autop_newline_preservation_helper has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Newline preservation help function for wpautop().
 *
 * @since 3.1.0
 * @access private
 *
 * @param array $matches preg_replace_callback matches array
 * @return string
 */
function _autop_newline_preservation_helper($matches)
{
    return str_replace("\n", '<WPPreserveNewline />', $matches[0]);
}

WordPress Version: 5.1

/**
 * Newline preservation help function for wpautop
 *
 * @since 3.1.0
 * @access private
 *
 * @param array $matches preg_replace_callback matches array
 * @return string
 */
function _autop_newline_preservation_helper($matches)
{
    return str_replace("\n", '<WPPreserveNewline />', $matches[0]);
}

WordPress Version: 3.7

/**
 * Newline preservation help function for wpautop
 *
 * @since 3.1.0
 * @access private
 *
 * @param array $matches preg_replace_callback matches array
 * @return string
 */
function _autop_newline_preservation_helper($matches)
{
    return str_replace("\n", "<WPPreserveNewline />", $matches[0]);
}