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.
Source
Changelog
Version | Description |
---|---|
5.8.0 | Introduced. |