block_version

SummerySummery

Returns the current version of the block format that the content string is using.

Syntax

block_version( string $content )

DescriptionDescription

If the string doesn’t contain blocks, it returns 0.

ParametersParameters

$content

(string) (Required) Content to test.

ReturnReturn

(int) The block format version is 1 if the content contains one or more blocks, 0 otherwise.

SourceSource

File: wp-includes/blocks.php


			

ChangelogChangelog

Changelog
Version Description
5.0.0 Introduced.
Scroll to Top