block_editor_preload_paths filter-hookWP 5.0.0

Deprecated from version 5.8.0. It is no longer supported and can be removed in future releases. See block_editor_rest_api_preload_paths.

Filters the array of paths that will be preloaded.

Preload common data by specifying an array of REST API paths that will be preloaded.

Usage

add_filter( 'block_editor_preload_paths', 'wp_kama_block_editor_preload_paths_filter', 10, 3 );

/**
 * Function for `block_editor_preload_paths` filter-hook.
 * 
 * @param string|string[])[] $preload_paths Array of paths to preload.
 * @param WP_Post            $selected_post Post being edited.
 * @param                    $string        
 *
 * @return string|string[])[]
 */
function wp_kama_block_editor_preload_paths_filter( $preload_paths, $selected_post, $string ){

	// filter...
	return $preload_paths;
}
$preload_paths(string|string[])[])
Array of paths to preload.
$selected_post(WP_Post)
Post being edited.
$string
-

Changelog

Since 5.0.0 Introduced.
Deprecated since 5.8.0 Use the {@see 'block_editor_rest_api_preload_paths'} filter instead.

Where the hook is called

block_editor_rest_api_preload()
block_editor_preload_paths
wp-includes/block-editor.php 719
$preload_paths = apply_filters_deprecated( 'block_editor_preload_paths', array( $preload_paths, $selected_post ), '5.8.0', 'block_editor_rest_api_preload_paths' );

Where the hook is used in WordPress

Usage not found.