filter_block_kses_value()
filter_block_kses_value( string[]|string $value, array[]|string $allowed_html, string[] $allowed_protocols = array() )
过滤和清理已分析的块属性值以删除不允许的HTML。
Filters and sanitizes a parsed block attribute value to remove non-allowable HTML.
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$value | (string[] | string) | 必需 | 要筛选的属性值。 |
$allowed_html | (array[] | string) | 必需 | 允许的HTML元素和属性的数组,或上下文名称,如“post”。 |
$allowed_protocols | (string[]) | 可选 | 允许的URL协议的数组。 |
返回(Return)
(string[]|string)过滤和清理的结果。
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
5.3.1 | wp-includes/blocks.php:321 | 2 | 2 |
filter_block_kses_value() 为WP2原创文章,链接:https://www.wp2.cn/functions/filter_block_kses_value/