WP_Block_Processor::get_depth
Returns the depth of the open blocks where the processor is currently matched.
Depth increases before visiting openers and void blocks and decreases before visiting closers. HTML spans behave like void blocks.
Метод класса: WP_Block_Processor{}
Хуков нет.
Возвращает
int.
Использование
$WP_Block_Processor = new WP_Block_Processor(); $WP_Block_Processor->get_depth(): int;
Список изменений
| С версии 6.9.0 | Введена. |
Код WP_Block_Processor::get_depth() WP Block Processor::get depth WP 6.9.1
public function get_depth(): int {
return count( $this->open_blocks_at );
}