Uses
Uses | Description |
---|---|
wp-includes/blocks.php: has_blocks() | Determine whether a post or content string has blocks. |
Returns the current version of the block format that the content string is using.
If the string doesn’t contain blocks, it returns 0.
(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. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/block_version