Blocks: Document Block Hooks functions as private.

Documents the 4 new 6.4 Block Hooks global functions as private and for Core-only internal usage:

* `make_before_block_visitor()`
* `make_after_block_visitor()`
* `traverse_and_serialize_block()`
* `traverse_and_serialize_blocks()`

This is being done as the architectural design of these new functions may change in the next cycle. Further denoting them as private / Core only can help to avoid extender churn if any of these functions are deprecated.

Follow up to [56649], [56620].

Props azaozz, hellofromTonya, bernhard-reiter, gziolo, mikeschroder.
Fixes #59783.
See #59313.
Built from https://develop.svn.wordpress.org/trunk@57066


git-svn-id: http://core.svn.wordpress.org/trunk@56577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
hellofromTonya 2023-11-06 13:37:24 +00:00
parent 747b2c9f11
commit faa928f218
2 changed files with 11 additions and 1 deletions

View File

@ -764,6 +764,8 @@ function get_hooked_blocks() {
* where it will inject the `theme` attribute into all Template Part blocks, and prepend the markup for
* any blocks hooked `before` the given block and as its parent's `first_child`, respectively.
*
* This function is meant for internal use only.
*
* @since 6.4.0
* @access private
*
@ -838,6 +840,8 @@ function make_before_block_visitor( $hooked_blocks, $context ) {
* where it will append the markup for any blocks hooked `after` the given block and as its parent's
* `last_child`, respectively.
*
* This function is meant for internal use only.
*
* @since 6.4.0
* @access private
*
@ -1035,7 +1039,10 @@ function serialize_blocks( $blocks ) {
* This function should be used when there is a need to modify the saved block, or to inject markup
* into the return value. Prefer `serialize_block` when preparing a block to be saved to post content.
*
* This function is meant for internal use only.
*
* @since 6.4.0
* @access private
*
* @see serialize_block()
*
@ -1117,7 +1124,10 @@ function traverse_and_serialize_block( $block, $pre_callback = null, $post_callb
* This function should be used when there is a need to modify the saved blocks, or to inject markup
* into the return value. Prefer `serialize_blocks` when preparing blocks to be saved to post content.
*
* This function is meant for internal use only.
*
* @since 6.4.0
* @access private
*
* @see serialize_blocks()
*

View File

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