wp_register_block_metadata_collection()
Registers a block metadata collection.
This function allows core and third-party plugins to register their block metadata collections in a centralized location. Registering collections can improve performance by avoiding multiple reads from the filesystem and parsing JSON.
No Hooks.
Return
null
. Nothing (null).
Usage
wp_register_block_metadata_collection( $path, $manifest );
- $path(string) (required)
- The base path in which block files for the collection reside.
- $manifest(string) (required)
- The path to the manifest file for the collection.
Changelog
Since 6.7.0 | Introduced. |
wp_register_block_metadata_collection() wp register block metadata collection code WP 6.7.1
function wp_register_block_metadata_collection( $path, $manifest ) { WP_Block_Metadata_Registry::register_collection( $path, $manifest ); }