wp_pre_kses_less_than_callback

函数


wp_pre_kses_less_than_callback ( $matches )
参数
  • (string[])
    $matches
    Populated by matches to preg_replace.
    Required:
返回值
  • (string) The text returned after esc_html if needed.
定义位置
  • wp-includes/formatting.php
    , line 5072
引入
2.3.0
弃用

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];
}