kses_init() - WordPress 函数参考中文文档

返回介绍

kses_init()

发布于 2017-09-11 字数1293 浏览 1003 评论 0

kses_init()

Sets up most of the Kses filters for input form content.


描述

If you remove the kses_init() function from ‘init’ hook and ‘set_current_user’ (priority is default), then none of the Kses filter hooks will be added.

First removes all of the Kses filters in case the current user does not need to have Kses filter the content. If the user does not have unfiltered_html capability, then Kses filters are added.


源代码

File: wp-includes/kses.php

function kses_init() {
	kses_remove_filters();

	if ( ! current_user_can( 'unfiltered_html' ) ) {
		kses_init_filters();
	}
}

更新日志

Version 描述
2.0.0 Introduced.

相关函数

Uses

  • wp-includes/capabilities.php:
    current_user_can()
  • wp-includes/kses.php:
    kses_remove_filters()
  • wp-includes/kses.php:
    kses_init_filters()

User Contributed Notes

上一篇:js_escape()

下一篇:kses_init_filters()

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!