Changeset 61294
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-block-processor.php
r61036 r61294 195 195 * while skipping over the parse of the rest of the document. 196 196 * 197 * {@see self::extract_ block()} will scan forward from the current block opener197 * {@see self::extract_full_block_and_advance()} will scan forward from the current block opener 198 198 * and build the parsed block structure until the current block is closed. It will 199 199 * include all inner HTML and inner blocks, and parse all of the inner blocks. It … … 208 208 * 209 209 * $gallery_at = $processor->get_span()->start; 210 * $gallery_block = $processor->extract_ block();210 * $gallery_block = $processor->extract_full_block_and_advance(); 211 211 * $after_gallery = $processor->get_span()->start; 212 212 * return ( … … 1224 1224 * 1225 1225 * $gallery_at = $processor->get_span()->start; 1226 * $gallery = $processor->extract_ block();1226 * $gallery = $processor->extract_full_block_and_advance(); 1227 1227 * $ends_before = $processor->get_span(); 1228 1228 * $ends_before = $ends_before->start ?? strlen( $post_content ); … … 1255 1255 * } 1256 1256 */ 1257 public function extract_ block(): ?array {1257 public function extract_full_block_and_advance(): ?array { 1258 1258 if ( $this->is_html() ) { 1259 1259 $chunk = $this->get_html_content(); … … 1292 1292 */ 1293 1293 if ( $this->opens_block() ) { 1294 $inner_block = $this->extract_ block();1294 $inner_block = $this->extract_full_block_and_advance(); 1295 1295 $block['innerBlocks'][] = $inner_block; 1296 1296 $block['innerContent'][] = null; -
trunk/tests/phpunit/tests/block-processor/wpBlockProcessor-BlockProcessing.php
r60939 r61294 87 87 $extracted = array(); 88 88 while ( $processor->next_block( '*' ) ) { 89 $extracted[] = $processor->extract_ block();89 $extracted[] = $processor->extract_full_block_and_advance(); 90 90 } 91 91
Note: See TracChangeset
for help on using the changeset viewer.