block_version()
最后更新于:2021-11-25 20:05:49
block_version( string$content)响应s the current version of the block format that the content string is using.
参数
- $content
-
(string) (Required) Content to test.
响应
(int) The block format version is 1 if the content contains one or more blocks, 0 otherwise.
源文件
文件: gc-includes/blocks.php
function block_version( $content ) {
return has_blocks( $content ) ? 1 : 0;
}