wp_pre_kses_less_than_callback()
Callback function used by preg_replace.
No Hooks.
Returns
String. The text returned after esc_html if needed.
Usage
wp_pre_kses_less_than_callback( $matches );
- $matches(string[]) (required)
- Populated by matches to preg_replace.
Changelog
| Since 2.3.0 | Introduced. |
wp_pre_kses_less_than_callback() wp pre kses less than callback code WP 6.9.1
function wp_pre_kses_less_than_callback( $matches ) {
if ( ! str_contains( $matches[0], '>' ) ) {
return esc_html( $matches[0] );
}
return $matches[0];
}