wpseek.com
WordPress开发者和主题制作者的搜索引擎



wp_pre_kses_less_than_callback › WordPress Function

Since2.3.0
已弃用n/a
wp_pre_kses_less_than_callback ( $matches )
参数:
  • (string[]) $matches Populated by matches to preg_replace.
    Required: Yes
返回:
  • (string) The text returned after esc_html if needed.
定义在:
文档:

Callback function used by preg_replace.



源码

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