WP_Block_Processor::__construct( string $source_text )

Creates a new block processor.

Description

Example:

$processor = new WP_Block_Processor( $post_content );
if ( $processor->next_block( 'core/image' ) ) {
    echo "Found an image!\n";
}

See also

Parameters

$source_textstringrequired
Input document potentially containing block content.

Source

public function __construct( string $source_text ) {
	$this->source_text = $source_text;
}

Changelog

VersionDescription
6.9.0Introduced.

User Contributed Notes

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