函数原型
block_version( string $content ): int
函数描述
Returns 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.
函数位置
File: wp-includes/blocks.php.
函数源码
function block_version( $content ) {
return has_blocks( $content ) ? 1 : 0;
}
源码链接
变更日志
| Version | Description |
|---|---|
| 5.0.0 | Introduced. |

