Migrates the experimental duotone support flag to the stabilized location.
Description
This moves supports.color.__experimentalDuotone
to supports.filter.duotone
.
Parameters
$settings
arrayrequired- Current block type settings.
$metadata
arrayrequired- Block metadata as read in via block.json.
Source
public static function migrate_experimental_duotone_support_flag( $settings, $metadata ) {
$duotone_support = isset( $metadata['supports']['color']['__experimentalDuotone'] )
? $metadata['supports']['color']['__experimentalDuotone']
: null;
if ( ! isset( $settings['supports']['filter']['duotone'] ) && null !== $duotone_support ) {
_wp_array_set( $settings, array( 'supports', 'filter', 'duotone' ), (bool) $duotone_support );
}
return $settings;
}
Changelog
Version | Description |
---|---|
6.3.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.