Make WordPress Core

Changeset 54776


Ignore:
Timestamp:
11/09/2022 09:49:51 AM (23 months ago)
Author:
audrasjb
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/block-editor.php

    r54769 r54776  
    572572 * @global WP_Styles  $wp_styles  The WP_Styles object for printing styles.
    573573 *
    574  * @param string[]                $preload_paths        List of paths to preload.
     574 * @param (string|string[])[]     $preload_paths        List of paths to preload.
    575575 * @param WP_Block_Editor_Context $block_editor_context The current block editor context.
    576576 */
     
    583583     * @since 5.8.0
    584584     *
    585      * @param string[]                $preload_paths        Array of paths to preload.
     585     * @param (string|string[])[]     $preload_paths        Array of paths to preload.
    586586     * @param WP_Block_Editor_Context $block_editor_context The current block editor context.
    587587     */
     
    599599         * @deprecated 5.8.0 Use the {@see 'block_editor_rest_api_preload_paths'} filter instead.
    600600         *
    601          * @param string[] $preload_paths Array of paths to preload.
    602          * @param WP_Post  $selected_post Post being edited.
     601         * @param (string|string[])[] $preload_paths Array of paths to preload.
     602         * @param WP_Post             $selected_post Post being edited.
    603603         */
    604604        $preload_paths = apply_filters_deprecated( 'block_editor_preload_paths', array( $preload_paths, $selected_post ), '5.8.0', 'block_editor_rest_api_preload_paths' );
Note: See TracChangeset for help on using the changeset viewer.