Make WordPress Core


Ignore:
Timestamp:
06/04/2024 11:53:37 AM (2 years ago)
Author:
ellatrix
Message:

Editor: Add theme.json v3 migrations.

See ​https://github.com/WordPress/wordpress-develop/pull/6616.
See also the original Gutenberg PRs:

Fixes #61282.

Props ajlende, talldanwp, ramonopoly, ellatrix.

File:
1 edited

Legend:

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

    r58213 r58328  
    26432643 * @since 6.5.0 The `appearance-tools` feature enables a few design tools for blocks,
    26442644 *              see `WP_Theme_JSON::APPEARANCE_TOOLS_OPT_INS` for a complete list.
     2645 * @since 6.6.0 The `editor-spacing-sizes` feature was added.
    26452646 *
    26462647 * @global array $_wp_theme_features
    … …  
    26702671 *                          - 'editor-gradient-presets'
    26712672 *                          - 'editor-font-sizes'
     2673 *                          - 'editor-spacing-sizes'
    26722674 *                          - 'editor-styles'
    26732675 *                          - 'featured-content'
    … …  
    42284230        );
    42294231        register_theme_feature(
     4232                'editor-spacing-sizes',
     4233                array(
     4234                        'type'         => 'array',
     4235                        'description'  => __( 'Custom spacing sizes if defined by the theme.' ),
     4236                        'show_in_rest' => array(
     4237                                'schema' => array(
     4238                                        'items' => array(
     4239                                                'type'       => 'object',
     4240                                                'properties' => array(
     4241                                                        'name' => array(
     4242                                                                'type' => 'string',
     4243                                                        ),
     4244                                                        'size' => array(
     4245                                                                'type' => 'string',
     4246                                                        ),
     4247                                                        'slug' => array(
     4248                                                                'type' => 'string',
     4249                                                        ),
     4250                                                ),
     4251                                        ),
     4252                                ),
     4253                        ),
     4254                )
     4255        );
     4256        register_theme_feature(
    42304257                'editor-styles',
    42314258                array(
Note: See TracChangeset for help on using the changeset viewer.