WP_Block_Processor::get_depth(): int

In this article

Returns the depth of the open blocks where the processor is currently matched.

Description

Depth increases before visiting openers and void blocks and decreases before visiting closers. HTML spans behave like void blocks.

Return

int

Source

public function get_depth(): int {
	return count( $this->open_blocks_at );
}

Changelog

VersionDescription
6.9.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.