Make WordPress Core


Ignore:
Timestamp:
03/28/2024 08:24:19 AM (3 months 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.

Reviewed by audrasjb.
Merges [57885] to the 6.5 branch.

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

Location:
branches/6.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.5

  • branches/6.5/src/wp-includes/class-wp-theme-json-resolver.php

    r57260 r57889  
    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.