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. Built from https://develop.svn.wordpress.org/trunk@44648 git-svn-id: http://core.svn.wordpress.org/trunk@44479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ac79b4e716
commit
9fc53b8461
|
@ -1463,8 +1463,6 @@ function register_and_do_post_meta_boxes( $post ) {
|
|||
}
|
||||
|
||||
if ( post_type_supports( $post_type, 'custom-fields' ) ) {
|
||||
$screen = get_current_screen();
|
||||
if ( ! $screen || ! $screen->is_block_editor() || (bool) get_user_meta( get_current_user_id(), 'enable_custom_fields', true ) ) {
|
||||
add_meta_box(
|
||||
'postcustom',
|
||||
__( 'Custom Fields' ),
|
||||
|
@ -1473,12 +1471,11 @@ function register_and_do_post_meta_boxes( $post ) {
|
|||
'normal',
|
||||
'core',
|
||||
array(
|
||||
'__back_compat_meta_box' => false,
|
||||
'__back_compat_meta_box' => ! (bool) get_user_meta( get_current_user_id(), 'enable_custom_fields', true ),
|
||||
'__block_editor_compatible_meta_box' => true,
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fires in the middle of built-in meta box registration.
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.1-beta1-44647';
|
||||
$wp_version = '5.1-beta1-44648';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue