Title: wp_register_block_metadata_collection
Published: November 13, 2024
Last modified: May 20, 2026

---

# wp_register_block_metadata_collection( string $path, string $manifest )

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/wp_register_block_metadata_collection/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/functions/wp_register_block_metadata_collection/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/functions/wp_register_block_metadata_collection/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/wp_register_block_metadata_collection/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_register_block_metadata_collection/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/wp_register_block_metadata_collection/?output_format=md#wp--skip-link--target)

Registers a block metadata collection.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/wp_register_block_metadata_collection/?output_format=md#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](https://developer.wordpress.org/reference/functions/wp_register_block_metadata_collection/?output_format=md#parameters)󠁿

 `$path`stringrequired

The base path in which block files for the collection reside.

`$manifest`stringrequired

The path to the manifest file for the collection.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/wp_register_block_metadata_collection/?output_format=md#source)󠁿

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

[View all references](https://developer.wordpress.org/reference/files/wp-includes/blocks.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/blocks.php#L436)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/blocks.php#L436-L438)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/wp_register_block_metadata_collection/?output_format=md#related)󠁿

| Uses | Description | 
| [WP_Block_Metadata_Registry::register_collection()](https://developer.wordpress.org/reference/classes/wp_block_metadata_registry/register_collection/)`wp-includes/class-wp-block-metadata-registry.php` |

Registers a block metadata collection.

  |

| Used by | Description | 
| [wp_register_block_types_from_metadata_collection()](https://developer.wordpress.org/reference/functions/wp_register_block_types_from_metadata_collection/)`wp-includes/blocks.php` |

Registers all block types from a block metadata collection.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_register_block_metadata_collection/?output_format=md#changelog)󠁿

| Version | Description | 
| [6.7.0](https://developer.wordpress.org/reference/since/6.7.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_register_block_metadata_collection%2F)
before being able to contribute a note or feedback.