Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion includes/classes/RegisteredDataHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function search_replace_block_inner_content( $block, $replacement_strings
* @param array $extra_data Array of extra data provided by source for the registered data.
* @param array $post_data Array of post data.
* @param int $index Index of the extra data.
* @return array Array with 'blocks' (processed blocks) and 'modified' (bool).
* @return array Array with 'blocks' (processed blocks), 'modified' (bool), and 'index' (int).
*/
public function process_blocks_data_recursive( $blocks, $registered_data, $extra_data, $post_data, $index = 0 ) {
$callback_fn = $registered_data['post_distribute_cb'] ?? null;
Expand All @@ -79,6 +79,7 @@ public function process_blocks_data_recursive( $blocks, $registered_data, $extra
return array(
'blocks' => $blocks,
'modified' => $modified,
'index' => $index,
);
}

Expand Down Expand Up @@ -155,12 +156,14 @@ public function process_blocks_data_recursive( $blocks, $registered_data, $extra
$block['innerBlocks'] = $inner_result['blocks'];
$modified = true;
}
$index = $inner_result['index'];
}
}

return array(
'blocks' => $blocks,
'modified' => $modified,
'index' => $index,
);
}

Expand Down
Loading