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



wp_pre_kses_less_than_callback ›

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