wp_html_split() WordPress Function
The wp_html_split() function is used to split HTML content into manageable chunks. This function is useful for those who want to process large amounts of HTML data, such as when parsing HTML documents or when working with the output of the wp_kses() function.
wp_html_split( string $input ) #
Separates HTML elements and comments from the text.
Parameters
- $input
(string)(Required)The text which has to be formatted.
Return
(string[]) Array of the formatted text.
Source
File: wp-includes/formatting.php
function wp_html_split( $input ) { return preg_split( get_html_split_regex(), $input, -1, PREG_SPLIT_DELIM_CAPTURE ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.2.4 | Introduced. |