WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 58 | * Preload common data by specifying an array of REST API paths that will be preloaded. |
| 59 | * |
| 60 | * Filters the array of paths that will be preloaded. |
| 61 | * |
| 62 | * @since 5.0.0 |
| 63 | * |
| 64 | * @param array $preload_paths Array of paths to preload. |
| 65 | * @param object $post The post resource data. |
| 66 | */ |
| 67 | $preload_paths = apply_filters( 'block_editor_preload_paths', $preload_paths, $post ); |
| 68 | |
| 69 | /* |
| 70 | * Ensure the global $post remains the same after API data is preloaded. |
| 71 | * Because API preloading can call the_content and other filters, plugins |
| 72 | * can unexpectedly modify $post. |
| 73 | */ |
| 74 | $backup_global_post = $post; |
| 75 | |
| 76 | $preload_data = array_reduce( |