Make WordPress Core

Changeset 57885

Timestamp:
03/27/2024 03:58:46 PM (4 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.

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

Location:
trunk
Files:
6 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
     316
     317
     318
     319
     320
     321
     322
     323
     324
    314325
    315326            // Allow themes to enable link color setting via theme_support.
  • trunk/src/wp-includes/class-wp-theme-json.php

    r57751 r57885  
    659659     * @since 6.2.0 Added `dimensions.minHeight` and `position.sticky`.
    660660     * @since 6.4.0 Added `background.backgroundImage`.
    661      * @since 6.5.0 Added `background.backgroundSize`, `dimensions.aspectRatio`, and `shadow.defaultPresets`.
     661     * @since 6.5.0 Added `background.backgroundSize``.
    662662     * @var array
    663663     */
     
    680680        array( 'spacing', 'padding' ),
    681681        array( 'typography', 'lineHeight' ),
    682         array( 'shadow', 'defaultPresets' ),
    683682    );
    684683
  • trunk/src/wp-includes/theme.json

    r57827 r57885  
    192192        },
    193193        "shadow": {
    194             "defaultPresets": false,
     194            "defaultPresets": e,
    195195            "presets": [
    196196                {
  • trunk/tests/phpunit/data/themedir1/block-theme/theme.json

    r57662 r57885  
    4949            "padding": true,
    5050            "blockGap": true
     51
     52
     53
     54
     55
     56
     57
     58
     59
     60
     61
     62
     63
     64
    5165        },
    5266        "blocks": {
  • trunk/tests/phpunit/tests/theme/wpThemeJson.php

    r57717 r57885  
    294294                'lineHeight' => true,
    295295            ),
    296             'shadow'     => array(
    297                 'defaultPresets' => true,
    298             ),
    299296            'blocks'     => array(
    300297                'core/paragraph' => array(
     
    334331                    'typography' => array(
    335332                        'lineHeight' => false,
    336                     ),
    337                     'shadow'     => array(
    338                         'defaultPresets' => true,
    339333                    ),
    340334                ),
  • trunk/tests/phpunit/tests/theme/wpThemeJsonResolver.php

    r57662 r57885  
    202202                    'blockGap' => true,
    203203                ),
     204
     205
     206
     207
     208
     209
     210
     211
     212
     213
     214
     215
     216
     217
     218
     219
    204220                'blocks'     => array(
    205221                    'core/paragraph' => array(
     
    556572                            'slug' => 'custom',
    557573                            'size' => '100px',
     574
     575
     576
     577
     578
     579
     580
     581
     582
     583
     584
     585
     586
     587
     588
     589
    558590                        ),
    559591                    ),
     
    10711103        );
    10721104    }
     1105
     1106
     1107
     1108
     1109
     1110
     1111
     1112
     1113
     1114
     1115
     1116
     1117
     1118
     1119
     1120
     1121
     1122
     1123
     1124
     1125
     1126
     1127
     1128
     1129
     1130
     1131
     1132
     1133
     1134
     1135
     1136
     1137
     1138
     1139
     1140
     1141
     1142
     1143
     1144
     1145
     1146
     1147
     1148
     1149
     1150
     1151
     1152
     1153
     1154
     1155
     1156
     1157
     1158
     1159
     1160
     1161
     1162
     1163
     1164
     1165
     1166
     1167
     1168
     1169
     1170
     1171
     1172
     1173
     1174
     1175
     1176
     1177
     1178
    10731179}
Note: See TracChangeset for help on using the changeset viewer.