WordPress at a glance
function is not described

wp_kses_split() WP 1.0.0

Searches for HTML tags, no matter how malformed.

It also matches stray > characters.

No Hooks.

Return

String. Content with fixed HTML tags

Usage

wp_kses_split( $string, $allowed_html, $allowed_protocols );
$string(string) (required)
Content to filter.
$allowed_html(array) (required)
Allowed HTML elements.
$allowed_protocols(string[]) (required)
Array of allowed URL protocols.

Notes

  • Global. Array. $pass_allowed_html
  • Global. Array. $pass_allowed_protocols

Changelog

Since 1.0.0 Introduced.

Code of wp kses split: wp-includes/kses.php WP 5.2.3

<?php
function wp_kses_split( $string, $allowed_html, $allowed_protocols ) {
	global $pass_allowed_html, $pass_allowed_protocols;
	$pass_allowed_html      = $allowed_html;
	$pass_allowed_protocols = $allowed_protocols;
	return preg_replace_callback( '%(<!--.*?(-->|$))|(<[^>]*(>|$)|>)%', '_wp_kses_split_callback', $string );
}