block_type_metadata_settings filter-hookWP 5.7.0

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

register_block_type_from_metadata()
block_type_metadata_settings
wp-includes/blocks.php 337-344
$settings = apply_filters(
	'block_type_metadata_settings',
	array_merge(
		$settings,
		$args
	),
	$metadata
);

Where the hook is used in WordPress

Usage not found.