Filters the metadata provided for registering a block type.
$metadataarraywp-includes/blocks.php:451register_block_type_from_metadata()wp-includes/blocks/comments.php:223register_legacy_post_comments_block()wp-includes/blocks/index.php:122register_core_block_style_handles() * Filters the metadata provided for registering a block type. * * @since 5.7.0 * * @param array $metadata Metadata for registering a block type. */ $metadata = apply_filters( 'block_type_metadata', $metadata ); // Add `style` and `editor_style` for core blocks if missing. if ( ! empty( $metadata['name'] ) && str_starts_with( $metadata['name'], 'core/' ) ) { $block_name = str_replace( 'core/', '', $metadata['name'] ); if ( ! isset( $metadata['style'] ) ) {Introduced in 5.7.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.