WordPress at a glance
function is not described

WP_Block_Parser::add_freeform() public WP 3.8.0

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

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

No Hooks.

Return

Null. Nothing.

Usage

$WP_Block_Parser = new WP_Block_Parser();
$WP_Block_Parser->add_freeform( $length );
$length(null)
how many bytes of document text to output.
Default: null

Changelog

Since 3.8.0 Introduced.

Code of WP_Block_Parser::add_freeform() WP 5.5.2

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

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

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