首页 WordPress函数大全 filter_block_content()

filter_block_content()

2020-05-01 / 3085阅 / 悠然

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

filter_block_content( string $text, array[]|string $allowed_html = 'post', string[] $allowed_protocols = array() )

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

描述

参数

$text

(string)
(Required)
Text that may contain block content.

$allowed_html

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

Default value: 'post'

$allowed_protocols

(string[])
(Optional)
Array of allowed URL protocols.

Default value: array()

返回

(string) The filtered and sanitized content result.

大家谈论
    我的见解