wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_pre_kses_less_than_callback › WordPress Function

Since2.3.0
Deprecatedn/a
wp_pre_kses_less_than_callback ( $matches )
Parameters:
  • (string[]) $matches Populated by matches to preg_replace.
    Required: Yes
Returns:
  • (string) The text returned after esc_html if needed.
Defined at:
Codex:

Callback function used by preg_replace.



Source

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