WordPress Version: 6.3
/**
* Callback function used by preg_replace.
*
* @since 2.3.0
*
* @param string[] $matches Populated by matches to preg_replace.
* @return string The text returned after esc_html if needed.
*/
function wp_pre_kses_less_than_callback($matches)
{
if (!str_contains($matches[0], '>')) {
return esc_html($matches[0]);
}
return $matches[0];
}