Meta Boxes: Add curly brackets missed in [43861].
This was causing the custom meta box to be incorrectly added to post types that don't support it. Props ocean90, epointal. Fixes #45257, Built from https://develop.svn.wordpress.org/branches/5.0@43863 git-svn-id: http://core.svn.wordpress.org/branches/5.0@43692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
56842f36aa
commit
a46a68ad7f
|
@ -1360,11 +1360,12 @@ function register_and_do_post_meta_boxes( $post ) {
|
|||
if ( post_type_supports($post_type, 'trackbacks') )
|
||||
add_meta_box('trackbacksdiv', __('Send Trackbacks'), 'post_trackback_meta_box', null, 'normal', 'core', array( '__back_compat_meta_box' => true ) );
|
||||
|
||||
if ( post_type_supports($post_type, 'custom-fields') )
|
||||
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'), 'post_custom_meta_box', null, 'normal', 'core', array( '__back_compat_meta_box' => false, '__block_editor_compatible_meta_box' => true ) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fires in the middle of built-in meta box registration.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.0-beta2-43862';
|
||||
$wp_version = '5.0-beta2-43863';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue