WPDev.one
Core Function
View Source on Trac ↗

wp_register_block_types_from_metadata_collection()

wp_register_block_types_from_metadata_collection( mixed $path, mixed $manifest = '' )

Registers all block types from a block metadata collection.

Parameters 2 required

Name / Type Description
$path
string

The absolute base path for the collection ( e.g., WP_PLUGIN_DIR . '/my-plugin/blocks/' ).

Required
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.

Required

Return Value

(void)
No return value description available.

Function Information

Since Version
6.8.0
Source File
wp-includes/blocks.php
Advertisement