WP_Duotone::migrate_experimental_duotone_support_flag()
Migrates the experimental duotone support flag to the stabilized location.
This moves supports.color.__experimentalDuotone to supports.filter.duotone.
Метод класса: WP_Duotone{}
Хуков нет.
Возвращает
Массив
. Filtered block type settings.
Использование
$result = WP_Duotone::migrate_experimental_duotone_support_flag( $settings, $metadata );
- $settings(массив) (обязательный)
- Current block type settings.
- $metadata(массив) (обязательный)
- Block metadata as read in via block.json.
Список изменений
С версии 6.3.0 | Введена. |
Код WP_Duotone::migrate_experimental_duotone_support_flag() WP Duotone::migrate experimental duotone support flag WP 6.6.2
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; }