block_editor_rest_api_preload_paths WordPress Filter Hook

The block_editor_rest_api_preload_paths hook allows you to preload data from the WordPress REST API into the block editor. This can be useful if you need to access data from the REST API that is not available in the block editor by default.

apply_filters( 'block_editor_rest_api_preload_paths', string[] $preload_paths, WP_Block_Editor_Context $block_editor_context ) #

Filters the array of REST API paths that will be used to preloaded common data for the block editor.


Parameters

$preload_paths

(string[])Array of paths to preload.

$block_editor_context

(WP_Block_Editor_Context)The current block editor context.


Top ↑

Source

File: wp-includes/block-editor.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.