wp_pre_kses_less_than_callback( string[] $matches ): string

Callback function used by preg_replace.


Parameters

$matches string[] Required
Populated by matches to preg_replace.

Top ↑

Return

string The text returned after esc_html if needed.


Top ↑

Source

File: wp-includes/formatting.php. View all references

function wp_pre_kses_less_than_callback( $matches ) {
	if ( ! str_contains( $matches[0], '>' ) ) {
		return esc_html( $matches[0] );
	}
	return $matches[0];
}


Top ↑

Changelog

Changelog
Version Description
2.3.0 Introduced.

Top ↑

User Contributed Notes

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