Blocks: Introduce a variation of serialize blocks helper with traversing

Introduces two new functions `traverse_and_serialize_blocks` and `traverse_and_serialize_block` with the additional `$callback` argument. It is possible to pass parent block, block index, chunk index to the callback argument.

Reverts changes applied to `serialize_blocks` and `serialize_block` in #59327 with [56557].

Props ockham, mukesh27.
See #59313.



Built from https://develop.svn.wordpress.org/trunk@56620


git-svn-id: http://core.svn.wordpress.org/trunk@56132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
gziolo
2023-09-19 12:50:19 +00:00
parent 8fbd793f33
commit d3a8869891
3 changed files with 77 additions and 16 deletions

View File

@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.4-alpha-56619';
$wp_version = '6.4-alpha-56620';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.