Make WordPress Core


Ignore:
Timestamp:
04/05/2022 12:06:48 PM (4 years ago)
Author:
gziolo
Message:

Editor: Backport block support changes from the Gutenberg plugin

Migrate spacing, border, color, dimensions, elements and typography and associated tests for block supports in the block editor.

Related changes in Gutenberg:

Props ramonopoly, aaronrobertshaw.
See #55505.

File:
1 edited

Legend:

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

    r53012 r53076  
    1919function wp_render_elements_support( $block_content, $block ) {
    2020    if ( ! $block_content ) {
     21        return $block_content;
     22    }
     23
     24    $block_type                    = WP_Block_Type_Registry::get_instance()->get_registered( $block['blockName'] );
     25    $skip_link_color_serialization = wp_should_skip_block_supports_serialization( $block_type, 'color', 'link' );
     26
     27    if ( $skip_link_color_serialization ) {
    2128        return $block_content;
    2229    }
Note: See TracChangeset for help on using the changeset viewer.