Make WordPress Core


Ignore:
Timestamp:
05/21/2021 10:12:42 AM (5 years ago)
Author:
youknowriad
Message:

Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC.

This also includes:

  • The removal of the Post Author block.
  • Renaming build_query_vars_from_query_block function.
  • Update the block supports.

Props gziolo.
See #52991.
-This line, and those below, will be ignored--

M package-lock.json
M package.json
M src/wp-includes/assets/script-loader-packages.php
M src/wp-includes/block-supports/colors.php
AM src/wp-includes/block-supports/elements.php
D src/wp-includes/block-supports/padding.php
AM src/wp-includes/block-supports/spacing.php
M src/wp-includes/block-supports/typography.php
M src/wp-includes/blocks/column/block.json
M src/wp-includes/blocks/index.php
D src/wp-includes/blocks/post-author
D src/wp-includes/blocks/post-author.php
M src/wp-includes/blocks/post-content.php
M src/wp-includes/blocks/post-featured-image.php
M src/wp-includes/blocks/query/block.json
M src/wp-includes/blocks/query-loop/block.json
M src/wp-includes/blocks/query-loop.php
M src/wp-includes/blocks/query-pagination/block.json
M src/wp-includes/blocks/query-pagination-next.php
M src/wp-includes/blocks/query-pagination-numbers.php
M src/wp-includes/blocks/site-tagline/block.json
M src/wp-includes/blocks/site-title/block.json
M src/wp-includes/blocks.php
M src/wp-settings.php
M tests/phpunit/tests/blocks/block.php
M tools/webpack/packages.js

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/block-supports/colors.php

    r50824 r50945  
    8484        $has_text_colors_support       = true === $color_support || ( is_array( $color_support ) && _wp_array_get( $color_support, array( 'text' ), true ) );
    8585        $has_background_colors_support = true === $color_support || ( is_array( $color_support ) && _wp_array_get( $color_support, array( 'background' ), true ) );
    86         $has_link_colors_support       = _wp_array_get( $color_support, array( 'link' ), false );
    8786        $has_gradients_support         = _wp_array_get( $color_support, array( 'gradients' ), false );
    8887        $classes                       = array();
    … …  
    104103                } elseif ( $has_custom_text_color ) {
    105104                        $styles[] = sprintf( 'color: %s;', $block_attributes['style']['color']['text'] );
    106                 }
    107         }
    108 
    109         // Link colors.
    110         if ( $has_link_colors_support ) {
    111                 $has_link_color = isset( $block_attributes['style']['color']['link'] );
    112                 // Apply required class and style.
    113                 if ( $has_link_color ) {
    114                         $classes[] = 'has-link-color';
    115                         // If link is a named color.
    116                         if ( strpos( $block_attributes['style']['color']['link'], 'var:preset|color|' ) !== false ) {
    117                                 // Get the name from the string and add proper styles.
    118                                 $index_to_splice = strrpos( $block_attributes['style']['color']['link'], '|' ) + 1;
    119                                 $link_color_name = substr( $block_attributes['style']['color']['link'], $index_to_splice );
    120                                 $styles[]        = sprintf( '--wp--style--color--link: var(--wp--preset--color--%s);', $link_color_name );
    121                         } else {
    122                                 $styles[] = sprintf( '--wp--style--color--link: %s;', $block_attributes['style']['color']['link'] );
    123                         }
    124105                }
    125106        }
Note: See TracChangeset for help on using the changeset viewer.