parse_blocks()
parse_blocks( string $content )
从内容字符串中分析块。
Parses blocks out of a content string.
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$content | (string) | 必需 | 发布内容。 |
返回(Return)
(array[])已分析块对象的数组。
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
5.0.0 | wp-includes/blocks.php:510 | 3 | 2 |
笔记(Notes)
段落块的返回数组示例:
从Gutenberg 7.7开始,对于此输入:
parse_blocks() 为WP2原创文章,链接:https://www.wp2.cn/functions/parse_blocks/