Make WordPress Core


Ignore:
Timestamp:
02/12/2026 05:43:12 AM (2 months ago)
Author:
ramonopoly
Message:

Block Supports: Add height to dimensions supports

This PR introduces dimensions.height to the list of available block supports.

This block support enables, in the future, the removal of the custom height controls in blocks such as Image, Spacer and others in favor of customizations via block supports.

Props aaronrobertshaw, andrewserong, ramonopoly, welcher, wildworks, youknowriad.

Fixes #64202.

File:
1 edited

Legend:

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

    r61619 r61620  
    238238     * @since 6.6.0 Added `background-[image|position|repeat|size]` properties.
    239239     * @since 6.7.0 Added `background-attachment` property.
    240      * @since 7.0.0 Added `dimensions.width`.
     240     * @since 7.0.0 Added `dimensions.width` and `dimensions.height`.
    241241     * @var array
    242242     */
     
    303303        'filter'                            => array( 'filter', 'duotone' ),
    304304        'box-shadow'                        => array( 'shadow' ),
     305        'height'                            => array( 'dimensions', 'height' ),
    305306        'width'                             => array( 'dimensions', 'width' ),
    306307        'writing-mode'                      => array( 'typography', 'writingMode' ),
     
    399400     * @since 6.9.0 Added support for `border.radiusSizes`.
    400401     * @since 7.0.0 Added type markers to the schema for boolean values.
    401      *              Added support for `dimensions.width`.
     402     *              Added support for `dimensions.width` and `dimensions.height`.
    402403     * @var array
    403404     */
     
    438439            'aspectRatios'        => null,
    439440            'defaultAspectRatios' => null,
     441            'height'              => null,
    440442            'minHeight'           => null,
    441443            'width'               => null,
     
    533535     * @since 6.5.0 Added support for `dimensions.aspectRatio`.
    534536     * @since 6.6.0 Added `background` sub properties to top-level only.
    535      * @since 7.0.0 Added support for `dimensions.width`.
     537     * @since 7.0.0 Added support for `dimensions.width` and `dimensions.height`.
    536538     * @var array
    537539     */
     
    561563        'dimensions' => array(
    562564            'aspectRatio' => null,
     565            'height'      => null,
    563566            'minHeight'   => null,
    564567            'width'       => null,
     
    773776     * @since 6.4.0 Added `background.backgroundImage`.
    774777     * @since 6.5.0 Added `background.backgroundSize` and `dimensions.aspectRatio`.
    775      * @since 7.0.0 Added `dimensions.width`.
     778     * @since 7.0.0 Added `dimensions.width` and `dimensions.height`.
    776779     * @var array
    777780     */
     
    788791        array( 'color', 'caption' ),
    789792        array( 'dimensions', 'aspectRatio' ),
     793        array( 'dimensions', 'height' ),
    790794        array( 'dimensions', 'minHeight' ),
    791795        array( 'dimensions', 'width' ),
Note: See TracChangeset for help on using the changeset viewer.