wp-includes/class-wp-block-processor.php:682Advance to the next block delimiter in a document, indicating if one was found.
* is provided as the block type, freeform content is matched.
<⃨h⃨2⃨>⃨M⃨y⃨ ⃨s⃨y⃨n⃨o⃨p⃨s⃨i⃨s⃨<⃨/⃨h⃨2⃨>⃨\⃨n⃨<!-- wp:my/table-of-contents /-->
// Inner HTML is never freeform content, and will not be matched even with the wildcard.
...</ul><⃨!⃨-⃨-⃨ ⃨/⃨w⃨p⃨:⃨l⃨i⃨s⃨t⃨ ⃨-⃨-⃨>⃨<!-- wp:paragraph --><p> Example: $html = '<!-- wp:void /-->\n<!-- wp:void /-->';
$processor = new WP_Block_Processor( $html );
while ( $processor->next_delimiter() {
// Runs twice, seeing both void blocks of type “core/void.”
}
$processor = new WP_Block_Processor( $html );
while ( $processor->next_delimiter( '*' ) ) {
// Runs thrice, seeing the void block, the newline span, and the void block.
}$block_namestring|nulloptionalnullbool public function next_delimiter( ?string $block_name = null ): bool { if ( ! isset( $block_name ) ) { while ( $this->next_token() ) { if ( ! $this->is_html() ) { return true; } } return false; } while ( $this->next_token() ) { if ( $this->is_block_type( $block_name ) ) { return true; } } return false; }Introduced in 6.9.0. Unchanged from 6.9.7 through 7.1.0.
Signature, return type and hooks compared across 3 parsed releases.
src/wp-includes/class-wp-block-processor.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.