wp_filter_kses()
wp_filter_kses( string $data ) 使用允许的HTML KSES规则清理内容。 Sa…
wp_filter_kses( string $data )
使用允许的HTML KSES规则清理内容。
Sanitize content with allowed HTML KSES rules.
使用允许的HTML KSES规则清理内容。
Sanitize content with allowed HTML KSES rules.
目录锚点:#说明#参数#源码
说明(Description)
此函数需要斜杠数据。
参数(Parameters)
| 参数 | 类型 | 说明 |
|---|---|---|
| $data | (string) | 要筛选的内容,应使用斜杠转义。 |
源码(Source)
/**
* Sanitize content with allowed HTML Kses rules.
*
* @since 1.0.0
*
* @param string $data Content to filter, expected to be escaped with slashes
* @return string Filtered content
*/
function wp_filter_kses( $data ) {
return addslashes( wp_kses( stripslashes( $data ), current_filter() ) );
}| 更新版本 | 源码位置 | 使用 | 被使用 |
|---|---|---|---|
| 1.0.0 | wp-includes/kses.php | 6 | 5 |
类别:WordPress 函数手册、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。

还没有任何评论,赶紧来占个楼吧!