WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/18/2019 05:25:48 AM (2 years ago)
Author:
pento
Message:

Block Editor: Restore the Custom Fields display option.

When merging, [44244] and [44260] were committed to trunk the opposite way that they were committed to the 5.0 branch. They were originally committed in [43885] and [43861], respectively.

Due to this switch, a change in how the Custom Fields meta box was registered wasn't merged from the 5.0 branch, causing it to not be registered correctly in trunk.

Props dd32, pento.
Fixes #46028.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/meta-boxes.php

    r44574 r44648  
    14641464
    14651465    if ( post_type_supports( $post_type, 'custom-fields' ) ) {
    1466         $screen = get_current_screen();
    1467         if ( ! $screen || ! $screen->is_block_editor() || (bool) get_user_meta( get_current_user_id(), 'enable_custom_fields', true ) ) {
    1468             add_meta_box(
    1469                 'postcustom',
    1470                 __( 'Custom Fields' ),
    1471                 'post_custom_meta_box',
    1472                 null,
    1473                 'normal',
    1474                 'core',
    1475                 array(
    1476                     '__back_compat_meta_box'             => false,
    1477                     '__block_editor_compatible_meta_box' => true,
    1478                 )
    1479             );
    1480         }
     1466        add_meta_box(
     1467            'postcustom',
     1468            __( 'Custom Fields' ),
     1469            'post_custom_meta_box',
     1470            null,
     1471            'normal',
     1472            'core',
     1473            array(
     1474                '__back_compat_meta_box'             => ! (bool) get_user_meta( get_current_user_id(), 'enable_custom_fields', true ),
     1475                '__block_editor_compatible_meta_box' => true,
     1476            )
     1477        );
    14811478    }
    14821479
Note: See TracChangeset for help on using the changeset viewer.