wp_html_split( string $input ): string[]

In this article

Separates HTML elements and comments from the text.

Parameters

$inputstringrequired
The text which has to be formatted.

Return

string[] Array of the formatted text.

Source

function wp_html_split( $input ) {
	return preg_split( get_html_split_regex(), $input, -1, PREG_SPLIT_DELIM_CAPTURE );
}

Changelog

VersionDescription
4.2.4Introduced.

User Contributed Notes

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