Make WordPress Core


Ignore:
Timestamp:
03/27/2024 03:58:46 PM (3 years ago)
Author:
swissspidy
Message:

Editor: disable shadow.defaultPresets for classic themes.

With this change default shadow presets are never shown for classic themes, and classic themes have no options for adding custom ones.
This essentially reverts [57717] and [57827] / [57828], which had unintended consequences.

Props ajlende, oandregal, madhudollu, swissspidy, get_dave, andrewserong, desrosj.
Fixes #60815.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-theme-json-resolver.php

    r57260 r57885  
    312312                        }
    313313                        $theme_support_data['settings']['color']['defaultGradients'] = $default_gradients;
     314
     315                        if ( ! isset( $theme_support_data['settings']['shadow'] ) ) {
     316                                $theme_support_data['settings']['shadow'] = array();
     317                        }
     318                        /*
     319                         * Shadow presets are explicitly disabled for classic themes until a
     320                         * decision is made for whether the default presets should match the
     321                         * other presets or if they should be disabled by default in classic
     322                         * themes. See https://github.com/WordPress/gutenberg/issues/59989.
     323                         */
     324                        $theme_support_data['settings']['shadow']['defaultPresets'] = false;
    314325
    315326                        // Allow themes to enable link color setting via theme_support.
Note: See TracChangeset for help on using the changeset viewer.