Core Function
View Source on Trac ↗ block_version()
block_version( mixed $content ) Returns the current version of the block format that the content string is using.
Parameters 1 required
| Name / Type | Description |
|---|---|
| $content string | Content to test. Required |
Return Value
(int)
The block format version is 1 if the content contains one or more blocks, 0 otherwise.
Function Information
Since Version
5.0.0
Source File
wp-includes/blocks.php
Advertisement