wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



block_version › WordPress Function

Da5.0.0
Deprecaton/a
block_version ( $content )
Parametri:
  • (string) $content Content to test.
    Richiesto:
Ritorna:
  • (int) The block format version is 1 if the content contains one or more blocks, 0 otherwise.
Definito a:
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.


Sorgenti

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