From 2fc04a03169a3c93f76cf40f75884766e82ad3e7 Mon Sep 17 00:00:00 2001 From: audrasjb Date: Wed, 9 Nov 2022 09:51:14 +0000 Subject: [PATCH] Docs: Fix `block_editor_rest_api_preload()` parameter type. This changeset fixes the `$preload_paths` parameter type for `block_editor_rest_api_preload()` and related hooks. This parameter expects an array of strings OR an array where the path is the first element (index 0) of this array. Props chouby. Fixes #56810. See #56792. Built from https://develop.svn.wordpress.org/trunk@54776 git-svn-id: http://core.svn.wordpress.org/trunk@54328 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/block-editor.php | 8 ++++---- wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-includes/block-editor.php b/wp-includes/block-editor.php index 901ba21a3f..7af9f2a900 100644 --- a/wp-includes/block-editor.php +++ b/wp-includes/block-editor.php @@ -571,7 +571,7 @@ function get_block_editor_settings( array $custom_settings, $block_editor_contex * @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts. * @global WP_Styles $wp_styles The WP_Styles object for printing styles. * - * @param string[] $preload_paths List of paths to preload. + * @param (string|string[])[] $preload_paths List of paths to preload. * @param WP_Block_Editor_Context $block_editor_context The current block editor context. */ function block_editor_rest_api_preload( array $preload_paths, $block_editor_context ) { @@ -582,7 +582,7 @@ function block_editor_rest_api_preload( array $preload_paths, $block_editor_cont * * @since 5.8.0 * - * @param string[] $preload_paths Array of paths to preload. + * @param (string|string[])[] $preload_paths Array of paths to preload. * @param WP_Block_Editor_Context $block_editor_context The current block editor context. */ $preload_paths = apply_filters( 'block_editor_rest_api_preload_paths', $preload_paths, $block_editor_context ); @@ -598,8 +598,8 @@ function block_editor_rest_api_preload( array $preload_paths, $block_editor_cont * @since 5.0.0 * @deprecated 5.8.0 Use the {@see 'block_editor_rest_api_preload_paths'} filter instead. * - * @param string[] $preload_paths Array of paths to preload. - * @param WP_Post $selected_post Post being edited. + * @param (string|string[])[] $preload_paths Array of paths to preload. + * @param WP_Post $selected_post Post being edited. */ $preload_paths = apply_filters_deprecated( 'block_editor_preload_paths', array( $preload_paths, $selected_post ), '5.8.0', 'block_editor_rest_api_preload_paths' ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 5de9f41ad4..16591f33a0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.2-alpha-54775'; +$wp_version = '6.2-alpha-54776'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.