block_type_metadata
block_type_metadata
Appears in: gutenberg.13.8.2, gutenberg.13.9.0, gutenberg.14.0.2, gutenberg.14.0.3, gutenberg.14.2.0, gutenberg.14.3.1, gutenberg.14.4.0, gutenberg.14.5.0, gutenberg.14.5.3, gutenberg.14.6.1, gutenberg.14.7.0, gutenberg.14.8.4, gutenberg.15.1.0, gutenberg.15.2.1, gutenberg.15.2.2, gutenberg.15.2.4, gutenberg.15.3.1, gutenberg.15.4.0, gutenberg.15.6.2, gutenberg.15.7.0, gutenberg.15.7.1, gutenberg.15.8.0, gutenberg.15.9.0, gutenberg.16.1.0, gutenberg.16.2.1, gutenberg.16.5.1, gutenberg.16.6.0, gutenberg.16.8.1, gutenberg.16.9.0, gutenberg.17.0.2, gutenberg.17.1.2, gutenberg.17.2.3, gutenberg.17.3.0, gutenberg.17.4.1, gutenberg.17.5.0, gutenberg.17.5.2, gutenberg.17.6.5, gutenberg.17.7.0, gutenberg.17.8.0, gutenberg.17.8.2, gutenberg.17.9.0, gutenberg.18.2.0, gutenberg.18.5.0, gutenberg.18.6.1, gutenberg.18.7.1, gutenberg.18.9.0, gutenberg.19.0.0, gutenberg.19.1.0, gutenberg.19.2.0, gutenberg.19.4.0, gutenberg.19.6.1, gutenberg.19.6.4, gutenberg.19.8.0, gutenberg.19.9.0, wordpress-5.7, wordpress-5.7.1, wordpress-5.7.2, wordpress-5.8, wordpress-5.8.1, wordpress-5.8.2, wordpress-5.8.3, wordpress-5.9, wordpress-5.9.1, wordpress-5.9.2, wordpress-5.9.3, wordpress-6.0, wordpress-6.0.1, wordpress-6.0.2, wordpress-6.0.3, wordpress-6.1, wordpress-6.1.1, wordpress-6.2, wordpress-6.2.1, wordpress-6.2.2, wordpress-6.3, wordpress-6.3.1, wordpress-6.3.2, wordpress-6.4, wordpress-6.4.1, wordpress-6.4.2, wordpress-6.4.3, wordpress-6.5, wordpress-6.5.2, wordpress-6.5.3, wordpress-6.5.4, wordpress-6.5.5, wordpress-6.6, wordpress-6.6.1, wordpress-6.6.2, wordpress-6.7, wordpress-6.7.1
Hook Type: filter
See hook in action
Displaying hooks found in version: wordpress-6.7.1apply_filters('block_type_metadata') is found 3 times:
- /wp-includes/blocks/comments.php line 223
Warning: Undefined array key 227 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167
Warning: Undefined array key 228 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167
* like `_wp_multiple_block_styles`, which is required in this case because * the block has multiple styles. */ /** This filter is documented in wp-includes/blocks.php */ $metadata = apply_filters( 'block_type_metadata', $metadata ); register_block_type( 'core/post-comments', $metadata ); } add_action( 'init', 'register_legacy_post_comments_block', 21 );
- /wp-includes/blocks/index.php line 122
}; foreach ( $core_blocks_meta as $name => $schema ) { /** This filter is documented in wp-includes/blocks.php */ $schema = apply_filters( 'block_type_metadata', $schema ); // Backfill these properties similar to `register_block_type_from_metadata()`. if ( ! isset( $schema['style'] ) ) { $schema['style'] = "wp-block-{$name}"; } if ( ! isset( $schema['editorStyle'] ) ) {
- /wp-includes/blocks.php line 451
* @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'] ) ) {