首页 WordPress函数大全 filter_block_kses()

filter_block_kses()

2020-05-01 / 4110阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

filter_block_kses( WP_Block_Parser_Block $block, array[]|string $allowed_html, string[] $allowed_protocols = array() )

Filters and sanitizes a parsed block to remove non-allowable HTML from block attribute values.

描述

参数

$block

(WP_Block_Parser_Block)
(Required)
The parsed block object.

$allowed_html

(array[]|string)
(Required)
An array of allowed HTML elements and attributes, or a context name such as 'post'.

$allowed_protocols

(string[])
(Optional)
Allowed URL protocols.

Default value: array()

返回

(array) The filtered and sanitized block object result.

大家谈论
    我的见解