mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-30 20:21:37 +01:00
Editor: Update PHPDoc for block bindings's context arg.
The context argument passed to the hooked_block_types filter can also be a Post object in the case of the navigation block. This adapts the PHPDoc accordingly. Props bernhard-reiter, gziolo. See #59743. Built from https://develop.svn.wordpress.org/trunk@57550 git-svn-id: http://core.svn.wordpress.org/trunk@57051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
74e189122b
commit
f82169f0bb
@ -823,11 +823,12 @@ function insert_hooked_blocks( &$parsed_anchor_block, $relative_position, $hooke
|
||||
*
|
||||
* @since 6.4.0
|
||||
*
|
||||
* @param string[] $hooked_block_types The list of hooked block types.
|
||||
* @param string $relative_position The relative position of the hooked blocks.
|
||||
* Can be one of 'before', 'after', 'first_child', or 'last_child'.
|
||||
* @param string $anchor_block_type The anchor block type.
|
||||
* @param WP_Block_Template|array $context The block template, template part, or pattern that the anchor block belongs to.
|
||||
* @param string[] $hooked_block_types The list of hooked block types.
|
||||
* @param string $relative_position The relative position of the hooked blocks.
|
||||
* Can be one of 'before', 'after', 'first_child', or 'last_child'.
|
||||
* @param string $anchor_block_type The anchor block type.
|
||||
* @param WP_Block_Template|WP_Post|array $context The block template, template part, `wp_navigation` post type,
|
||||
* or pattern that the anchor block belongs to.
|
||||
*/
|
||||
$hooked_block_types = apply_filters( 'hooked_block_types', $hooked_block_types, $relative_position, $anchor_block_type, $context );
|
||||
|
||||
@ -847,10 +848,11 @@ function insert_hooked_blocks( &$parsed_anchor_block, $relative_position, $hooke
|
||||
*
|
||||
* @since 6.5.0
|
||||
*
|
||||
* @param array $parsed_hooked_block The parsed block array for the given hooked block type.
|
||||
* @param string $relative_position The relative position of the hooked block.
|
||||
* @param array $parsed_anchor_block The anchor block, in parsed block array format.
|
||||
* @param WP_Block_Template|array $context The block template, template part, or pattern that the anchor block belongs to.
|
||||
* @param array $parsed_hooked_block The parsed block array for the given hooked block type.
|
||||
* @param string $relative_position The relative position of the hooked block.
|
||||
* @param array $parsed_anchor_block The anchor block, in parsed block array format.
|
||||
* @param WP_Block_Template|WP_Post|array $context The block template, template part, `wp_navigation` post type,
|
||||
* or pattern that the anchor block belongs to.
|
||||
*/
|
||||
$parsed_hooked_block = apply_filters( "hooked_block_{$hooked_block_type}", $parsed_hooked_block, $relative_position, $parsed_anchor_block, $context );
|
||||
|
||||
@ -874,8 +876,9 @@ function insert_hooked_blocks( &$parsed_anchor_block, $relative_position, $hooke
|
||||
* @since 6.4.0
|
||||
* @access private
|
||||
*
|
||||
* @param array $hooked_blocks An array of blocks hooked to another given block.
|
||||
* @param WP_Block_Template|array $context A block template, template part, or pattern that the blocks belong to.
|
||||
* @param array $hooked_blocks An array of blocks hooked to another given block.
|
||||
* @param WP_Block_Template|WP_Post|array $context A block template, template part, `wp_navigation` post object,
|
||||
* or pattern that the blocks belong to.
|
||||
* @return callable A function that returns the serialized markup for the given block,
|
||||
* including the markup for any hooked blocks before it.
|
||||
*/
|
||||
@ -920,8 +923,9 @@ function make_before_block_visitor( $hooked_blocks, $context ) {
|
||||
* @since 6.4.0
|
||||
* @access private
|
||||
*
|
||||
* @param array $hooked_blocks An array of blocks hooked to another block.
|
||||
* @param WP_Block_Template|array $context A block template, template part, or pattern that the blocks belong to.
|
||||
* @param array $hooked_blocks An array of blocks hooked to another block.
|
||||
* @param WP_Block_Template|WP_Post|array $context A block template, template part, `wp_navigation` post object,
|
||||
* or pattern that the blocks belong to.
|
||||
* @return callable A function that returns the serialized markup for the given block,
|
||||
* including the markup for any hooked blocks after it.
|
||||
*/
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.5-alpha-57549';
|
||||
$wp_version = '6.5-alpha-57550';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user