Returns the current version of the block format that the content string is using.
Description
If the string doesn’t contain blocks, it returns 0.
Parameters
$content
stringrequired- Content to test.
Source
function block_version( $content ) {
return has_blocks( $content ) ? 1 : 0;
}
Changelog
Version | Description |
---|---|
5.0.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.