@@ -209,7 +209,7 @@ private static function colord_parse_hue( $value, $unit = 'deg' ) {
209209 'rad ' => 360 / ( M_PI * 2 ),
210210 );
211211
212- $ factor = isset ( $ angle_units [ $ unit ] ) ? $ angle_units [ $ unit ] : 1 ;
212+ $ factor = $ angle_units [ $ unit ] ?? 1 ;
213213
214214 return (float ) $ value * $ factor ;
215215 }
@@ -972,9 +972,7 @@ private static function get_selector( $block_type ) {
972972 * If the experimental duotone support was set, that value is to be
973973 * treated as a selector and requires scoping.
974974 */
975- $ experimental_duotone = isset ( $ block_type ->supports ['color ' ]['__experimentalDuotone ' ] )
976- ? $ block_type ->supports ['color ' ]['__experimentalDuotone ' ]
977- : false ;
975+ $ experimental_duotone = $ block_type ->supports ['color ' ]['__experimentalDuotone ' ] ?? false ;
978976 if ( $ experimental_duotone ) {
979977 $ root_selector = wp_get_block_css_selector ( $ block_type );
980978 return is_string ( $ experimental_duotone )
@@ -1003,7 +1001,7 @@ private static function get_all_global_styles_presets() {
10031001 }
10041002 // Get the per block settings from the theme.json.
10051003 $ tree = wp_get_global_settings ();
1006- $ presets_by_origin = isset ( $ tree ['color ' ]['duotone ' ] ) ? $ tree [ ' color ' ][ ' duotone ' ] : array ();
1004+ $ presets_by_origin = $ tree ['color ' ]['duotone ' ] ?? array ();
10071005
10081006 self ::$ global_styles_presets = array ();
10091007 foreach ( $ presets_by_origin as $ presets ) {
@@ -1304,9 +1302,7 @@ public static function add_editor_settings( $settings ) {
13041302 * @return array Filtered block type settings.
13051303 */
13061304 public static function migrate_experimental_duotone_support_flag ( $ settings , $ metadata ) {
1307- $ duotone_support = isset ( $ metadata ['supports ' ]['color ' ]['__experimentalDuotone ' ] )
1308- ? $ metadata ['supports ' ]['color ' ]['__experimentalDuotone ' ]
1309- : null ;
1305+ $ duotone_support = $ metadata ['supports ' ]['color ' ]['__experimentalDuotone ' ] ?? null ;
13101306
13111307 if ( ! isset ( $ settings ['supports ' ]['filter ' ]['duotone ' ] ) && null !== $ duotone_support ) {
13121308 _wp_array_set ( $ settings , array ( 'supports ' , 'filter ' , 'duotone ' ), (bool ) $ duotone_support );
0 commit comments