A WordPress-centric search engine for devs and theme authors



wp_pre_kses_less_than_callback ›

Since2.3.0
Deprecatedn/a
wp_pre_kses_less_than_callback ( $matches )
Parameters:
  • (array) $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 ( false === strpos( $matches[0], '>' ) ) {
		return esc_html( $matches[0] );
	}
	return $matches[0];
}