Make WordPress Core

Ticket #46028: 46028.diff

File 46028.diff, 1.1 KB (added by pento, 7 years ago)
  • src/wp-admin/includes/meta-boxes.php

    diff --git a/src/wp-admin/includes/meta-boxes.php b/src/wp-admin/includes/meta-boxes.php
    index 805d69cac7..508168a5bf 100644
    a b function register_and_do_post_meta_boxes( $post ) { 
    14631463        }
    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
    14831480        /**