wp_register_block_types_from_metadata_collection
wp_register_block_types_from_metadata_collection ( $path, $manifest = '' )
Parameters:- (string) path The absolute base path for the collection ( e.g., WP_PLUGIN_DIR . '/my-plugin/blocks/' ).
- (string) manifest Optional. The absolute path to the manifest file containing the metadata collection, in order to register the collection. If this parameter is not provided, the `$path` parameter must reference a previously registered block metadata collection.
See:Defined at: - Introduced in WordPress: 6.8.0
- Deprecated in WordPress: —
Description
Registers all block types from a block metadata collection.This can either reference a previously registered metadata collection or, if the `$manifest` parameter is provided,
register the metadata collection directly within the same function call.