W3cubDocs

/WordPress

wp_register_block_metadata_collection( string $path, string $manifest )

Registers a block metadata collection.

Description

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.

Parameters

$pathstringrequired
The base path in which block files for the collection reside.
$manifeststringrequired
The path to the manifest file for the collection.

Source

function wp_register_block_metadata_collection( $path, $manifest ) {
	WP_Block_Metadata_Registry::register_collection( $path, $manifest );
}

Changelog

Version Description
6.7.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_register_block_metadata_collection