WordPress.org

Make WordPress Core

Changeset 44222


Ignore:
Timestamp:
12/16/2018 01:55:08 AM (9 months ago)
Author:
jeremyfelt
Message:

Block Editor: Don't show back compat or incompatible meta boxes in Options.

Meta boxes that exist for back compat, or that are incompatible with the block editor aren't displayed, so they don't need an option to display or hide them in the Options dialog.

Merges [43856] from the 5.0 branch to trunk.

Props noisysocks.
Fixes #45249.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-admin/includes/post.php

    r44177 r44222  
    22462246                }
    22472247
     2248                // If a meta box is just here for back compat, don't show it in the block editor.
     2249                if ( isset( $meta_box['args']['__back_compat_meta_box'] ) && $meta_box['args']['__back_compat_meta_box'] ) {
     2250                    continue;
     2251                }
     2252
     2253                // If a meta box doesn't work in the block editor, don't show it in the block editor.
     2254                if ( isset( $meta_box['args']['__block_editor_compatible_meta_box'] ) && ! $meta_box['args']['__block_editor_compatible_meta_box'] ) {
     2255                    continue;
     2256                }
     2257
    22482258                $meta_boxes_per_location[ $location ][] = array(
    22492259                    'id'    => $meta_box['id'],
Note: See TracChangeset for help on using the changeset viewer.