Changeset 49580 for trunk/src/wp-includes/block-supports/colors.php
- Timestamp:
- 11/12/2020 08:18:08 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-supports/colors.php
r49226 r49580 16 16 $color_support = false; 17 17 if ( property_exists( $block_type, 'supports' ) ) { 18 $color_support = wp_array_get( $block_type->supports, array( '__experimentalColor' ), false );18 $color_support = _wp_array_get( $block_type->supports, array( '__experimentalColor' ), false ); 19 19 } 20 $has_text_colors_support = true === $color_support || ( is_array( $color_support ) && wp_array_get( $color_support, array( 'text' ), true ) );21 $has_background_colors_support = true === $color_support || ( is_array( $color_support ) && wp_array_get( $color_support, array( 'background' ), true ) );22 $has_gradients_support = wp_array_get( $color_support, array( 'gradients' ), false );20 $has_text_colors_support = true === $color_support || ( is_array( $color_support ) && _wp_array_get( $color_support, array( 'text' ), true ) ); 21 $has_background_colors_support = true === $color_support || ( is_array( $color_support ) && _wp_array_get( $color_support, array( 'background' ), true ) ); 22 $has_gradients_support = _wp_array_get( $color_support, array( 'gradients' ), false ); 23 23 24 24 if ( ! $block_type->attributes ) { … … 64 64 */ 65 65 function wp_apply_colors_support( $block_type, $block_attributes ) { 66 $color_support = wp_array_get( $block_type->supports, array( '__experimentalColor' ), false );67 $has_text_colors_support = true === $color_support || ( is_array( $color_support ) && wp_array_get( $color_support, array( 'text' ), true ) );68 $has_background_colors_support = true === $color_support || ( is_array( $color_support ) && wp_array_get( $color_support, array( 'background' ), true ) );69 $has_link_colors_support = wp_array_get( $color_support, array( 'linkColor' ), false );70 $has_gradients_support = wp_array_get( $color_support, array( 'gradients' ), false );66 $color_support = _wp_array_get( $block_type->supports, array( '__experimentalColor' ), false ); 67 $has_text_colors_support = true === $color_support || ( is_array( $color_support ) && _wp_array_get( $color_support, array( 'text' ), true ) ); 68 $has_background_colors_support = true === $color_support || ( is_array( $color_support ) && _wp_array_get( $color_support, array( 'background' ), true ) ); 69 $has_link_colors_support = _wp_array_get( $color_support, array( 'linkColor' ), false ); 70 $has_gradients_support = _wp_array_get( $color_support, array( 'gradients' ), false ); 71 71 $classes = array(); 72 72 $styles = array();
Note: See TracChangeset
for help on using the changeset viewer.