Make WordPress Core


Ignore:
Timestamp:
01/29/2024 09:04:18 PM (17 months ago)
Author:
youknowriad
Message:

Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.

This patch, somewhat small brings a lot to WordPress.
This includes features like:

  • DataViews.
  • Customization tools like box shadow, background size and repeat.
  • UI improvements in the site editor.
  • Preferences sharing between the post and site editors.
  • Unified panels and editors between post and site editors.
  • Improved template mode in the post editor.
  • Iterations to multiple interactive blocks.
  • Preparing the blocks and UI for pattern overrides.
  • and a lot more.

Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.

File:
1 edited

Legend:

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

    r56755 r57377  
    6969 */
    7070function register_block_core_footnotes() {
    71     foreach ( array( 'post', 'page' ) as $post_type ) {
    72         register_post_meta(
    73             $post_type,
    74             'footnotes',
    75             array(
    76                 'show_in_rest'      => true,
    77                 'single'            => true,
    78                 'type'              => 'string',
    79                 'revisions_enabled' => true,
    80             )
    81         );
     71    $post_types = get_post_types(
     72        array(
     73            'show_in_rest' => true,
     74            'public'       => true,
     75        )
     76    );
     77    foreach ( $post_types as $post_type ) {
     78        // Only register the meta field if the post type supports the editor, custom fields, and revisions.
     79        if ( post_type_supports( $post_type, 'editor' ) && post_type_supports( $post_type, 'custom-fields' ) && post_type_supports( $post_type, 'revisions' ) ) {
     80            register_post_meta(
     81                $post_type,
     82                'footnotes',
     83                array(
     84                    'show_in_rest'      => true,
     85                    'single'            => true,
     86                    'type'              => 'string',
     87                    'revisions_enabled' => true,
     88                )
     89            );
     90        }
    8291    }
    8392    register_block_type_from_metadata(
Note: See TracChangeset for help on using the changeset viewer.