Skip to content

Commit 78f8d3e

Browse files
committed
Commenting
1 parent 97e79ca commit 78f8d3e

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/wp-includes/media.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5346,17 +5346,18 @@ function get_post_galleries( $post, $html = true, $max_galleries = PHP_INT_MAX )
53465346

53475347
// New Gallery block format as an array.
53485348
if ( $has_inner_blocks ) {
5349-
// There are inner blocks and this is the first one; the loop above aborted at its opening.
5350-
53515349
/**
5350+
* There are inner blocks and this is the first one;
5351+
* the loop above aborted at its opening, so initially the processor
5352+
* is paused on the opening delimiter of the first inner block.
5353+
*
53525354
* @todo Could avoid computation by tracking seen ids and only looking up the
53535355
* attachment url if the id hasn’t already been resolved.
53545356
*/
5355-
53565357
do {
53575358
// Examine only the direct children of the gallery block.
53585359
if ( $processor->get_depth() === $gallery_depth + 1 ) {
5359-
/** @var @todo Perfect use-case for lazy parsing here — only the `id` is wanted. */
5360+
/** @todo Perfect use-case for lazy parsing here — only the `id` is wanted. */
53605361
$id = $processor->allocate_and_return_parsed_attributes()['id'] ?? null;
53615362
if ( isset( $id ) ) {
53625363
$ids[] = $id;

0 commit comments

Comments
 (0)