block_version
block_version ( $content )
Parameters:- (string) content Content to test.
Returns:- (int) The block format version is 1 if the content contains one or more blocks, 0 otherwise.
Defined at: - Introduced in WordPress: 5.0.0
- Deprecated in WordPress: —
Description
Returns the current version of the block format that the content string is using.If the string doesn't contain blocks, it returns 0.