wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



block_version › WordPress Function

Od5.0.0
Przestarzałyn/a
block_version ( $content )
Parametry:
  • (string) $content Content to test.
    Wymagane: Tak
Powrót:
  • (int) The block format version is 1 if the content contains one or more blocks, 0 otherwise.
Zdefiniowane na:
Codex:

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

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


Źródło

function block_version( $content ) {
	return has_blocks( $content ) ? 1 : 0;
}