Make WordPress Core

Changeset 58242

Timestamp:
05/30/2024 03:08:31 AM (2 months ago)
Author:
isabel_brison
Message:

Editor: add aspect ratio presets support.

Enables customizing the list of aspect ratio options available through theme.json.

Props fabiankaegy, isabel_brison, swissspidy.

Location:
trunk/src/wp-includes
Files:
3 edited

Legend:

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

    r58241 r58242  
    124124     * @since 6.2.0 Added 'shadow' presets.
    125125     * @since 6.3.0 Replaced value_func for duotone with `null`. Custom properties are handled by class-wp-duotone.php.
     126
    126127     * @var array
    127128     */
    128129    const PRESETS_METADATA = array(
     130
     131
     132
     133
     134
     135
     136
     137
     138
    129139        array(
    130140            'path'              => array( 'color', 'palette' ),
     
    366376     * @since 6.5.0 Added support for `layout.allowCustomContentAndWideSize`,
    367377     *              `background.backgroundSize` and `dimensions.aspectRatio`.
     378
    368379     * @var array
    369380     */
     
    400411        'custom'                        => null,
    401412        'dimensions'                    => array(
    402             'aspectRatio' => null,
    403             'minHeight'   => null,
     413            'aspectRatio'         => null,
     414            'aspectRatios'        => null,
     415            'defaultAspectRatios' => null,
     416            'minHeight'           => null,
    404417        ),
    405418        'layout'                        => array(
  • trunk/src/wp-includes/theme-i18n.json

    r54272 r58242  
    3535                {
    3636                    "name": "Space size name"
     37
     38
     39
     40
     41
     42
     43
    3744                }
    3845            ]
  • trunk/src/wp-includes/theme.json

    r57885 r58242  
    190190            ],
    191191            "text": true
     192
     193
     194
     195
     196
     197
     198
     199
     200
     201
     202
     203
     204
     205
     206
     207
     208
     209
     210
     211
     212
     213
     214
     215
     216
     217
     218
     219
     220
     221
     222
     223
     224
     225
     226
     227
     228
     229
     230
     231
    192232        },
    193233        "shadow": {
Note: See TracChangeset for help on using the changeset viewer.