WordPress at a glance
функция не описана

WP_Block_Parser::add_block_from_stack() public WP 3.8.0

Pushes the top block from the parsing stack to the output list.

It's a method of the class: WP_Block_Parser{}

Хуков нет.

Возвращает

Null. Ничего.

Использование

$WP_Block_Parser = new WP_Block_Parser();
$WP_Block_Parser->add_block_from_stack( $end_offset );
$end_offset(int/null)
byte offset into document for where we should stop sending text output as HTML.
Default: null

Changelog

Since 3.8.0 Introduced.

Код WP_Block_Parser::add_block_from_stack() WP 5.5.1

<?php
function add_block_from_stack( $end_offset = null ) {
	$stack_top   = array_pop( $this->stack );
	$prev_offset = $stack_top->prev_offset;

	$html = isset( $end_offset )
		? substr( $this->document, $prev_offset, $end_offset - $prev_offset )
		: substr( $this->document, $prev_offset );

	if ( ! empty( $html ) ) {
		$stack_top->block->innerHTML     .= $html;
		$stack_top->block->innerContent[] = $html;
	}

	if ( isset( $stack_top->leading_html_start ) ) {
		$this->output[] = (array) self::freeform(
			substr(
				$this->document,
				$stack_top->leading_html_start,
				$stack_top->token_start - $stack_top->leading_html_start
			)
		);
	}

	$this->output[] = (array) $stack_top->block;
}