WP_Block_Parser::add_freeform()publicWP 5.0.0

Pushes a length of text from the input document to the output list as a freeform block.

{} Это метод класса: WP_Block_Parser{}

Хуков нет.

Возвращает

null. Ничего.

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

$WP_Block_Parser = new WP_Block_Parser();
$WP_Block_Parser->add_freeform( $length );
$length(null)
how many bytes of document text to output.
По умолчанию: null

Список изменений

С версии 5.0.0 Введена.

Код WP_Block_Parser::add_freeform() WP 6.0.2

function add_freeform( $length = null ) {
	$length = $length ? $length : strlen( $this->document ) - $this->offset;

	if ( 0 === $length ) {
		return;
	}

	$this->output[] = (array) $this->freeform( substr( $this->document, $this->offset, $length ) );
}