W3cubDocs

/WordPress

wp_pre_kses_less_than( string $content ): string

Converts lone less than signs.

Description

KSES already converts lone greater than signs.

Parameters

$contentstringrequired
Text to be converted.

Return

string Converted text.

Source

function wp_pre_kses_less_than( $content ) {
	return preg_replace_callback( '%<[^>]*?((?=<)|>|$)%', 'wp_pre_kses_less_than_callback', $content );
}

Changelog

Version Description
2.3.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_pre_kses_less_than