Make WordPress Core


Ignore:
Timestamp:
09/18/2023 06:25:49 AM (20 months ago)
Author:
isabel_brison
Message:

Editor: add block instance element color support for buttons and headings.

Adds support for buttons and headings to the colors and elements block supports, allowing button and heading element colors to be changed on individual blocks.

Props aaronrobertshaw.
Fixes #59309.

File:
1 edited

Legend:

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

    r54873 r56604  
    2222    $has_gradients_support         = _wp_array_get( $color_support, array( 'gradients' ), false );
    2323    $has_link_colors_support       = _wp_array_get( $color_support, array( 'link' ), false );
     24    $has_button_colors_support     = _wp_array_get( $color_support, array( 'button' ), false );
     25    $has_heading_colors_support    = _wp_array_get( $color_support, array( 'heading' ), false );
    2426    $has_color_support             = $has_text_colors_support ||
    2527        $has_background_colors_support ||
    2628        $has_gradients_support ||
    27         $has_link_colors_support;
     29        $has_link_colors_support ||
     30        $has_button_colors_support ||
     31        $has_heading_colors_support;
    2832
    2933    if ( ! $block_type->attributes ) {
Note: See TracChangeset for help on using the changeset viewer.