block_type_metadata_settings
Filters the settings determined from the block type metadata.
Usage
add_filter( 'block_type_metadata_settings', 'wp_kama_block_type_metadata_settings_filter', 10, 2 ); /** * Function for `block_type_metadata_settings` filter-hook. * * @param array $settings Array of determined settings for registering a block type. * @param array $metadata Metadata provided for registering a block type. * * @return array */ function wp_kama_block_type_metadata_settings_filter( $settings, $metadata ){ // filter... return $settings; }
- $settings(array)
- Array of determined settings for registering a block type.
- $metadata(array)
- Metadata provided for registering a block type.
Changelog
Since 5.7.0 | Introduced. |
Where the hook is called
block_type_metadata_settings
wp-includes/blocks.php 706
$settings = apply_filters( 'block_type_metadata_settings', $settings, $metadata );
Where the hook is used in WordPress
wp-includes/block-supports/duotone.php 60
add_filter( 'block_type_metadata_settings', array( 'WP_Duotone', 'migrate_experimental_duotone_support_flag' ), 10, 2 );