_autop_newline_preservation_helper( array $matches ): string

In this article

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Newline preservation help function for wpautop() .

Parameters

$matchesarrayrequired
preg_replace_callback matches array

Return

string

Source

function _autop_newline_preservation_helper( $matches ) {
	return str_replace( "\n", '<WPPreserveNewline />', $matches[0] );
}

Changelog

VersionDescription
3.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.