Changeset 56709 for trunk/src/wp-includes/class-wp-duotone.php
- Timestamp:
- 09/26/2023 01:45:23 PM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-duotone.php
r56226 r56709 972 972 * treated as a selector and requires scoping. 973 973 */ 974 $experimental_duotone = _wp_array_get( $block_type->supports, array( 'color', '__experimentalDuotone' ), false ); 974 $experimental_duotone = isset( $block_type->supports['color']['__experimentalDuotone'] ) 975 ? $block_type->supports['color']['__experimentalDuotone'] 976 : false; 975 977 if ( $experimental_duotone ) { 976 978 $root_selector = wp_get_block_css_selector( $block_type ); … … 1001 1003 // Get the per block settings from the theme.json. 1002 1004 $tree = wp_get_global_settings(); 1003 $presets_by_origin = _wp_array_get( $tree, array( 'color', 'duotone' ), array());1005 $presets_by_origin = isset( $tree['color']['duotone'] ) ? $tree['color']['duotone'] : array(); 1004 1006 1005 1007 self::$global_styles_presets = array(); … … 1263 1265 */ 1264 1266 public static function migrate_experimental_duotone_support_flag( $settings, $metadata ) { 1265 $duotone_support = _wp_array_get( $metadata, array( 'supports', 'color', '__experimentalDuotone' ), null ); 1267 $duotone_support = isset( $metadata['supports']['color']['__experimentalDuotone'] ) 1268 ? $metadata['supports']['color']['__experimentalDuotone'] 1269 : null; 1266 1270 1267 1271 if ( ! isset( $settings['supports']['filter']['duotone'] ) && null !== $duotone_support ) {
Note: See TracChangeset
for help on using the changeset viewer.