Make WordPress Core

Changeset 43856


Ignore:
Timestamp:
11/01/2018 04:32:37 AM (5 years ago)
Author:
pento
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.

Props noisysocks.
Fixes #45249.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-admin/includes/post.php

    r43840 r43856  
    20972097                }
    20982098
     2099                // If a meta box is just here for back compat, don't show it in the block editor.
     2100                if ( isset( $meta_box['args']['__back_compat_meta_box'] ) && $meta_box['args']['__back_compat_meta_box'] ) {
     2101                    continue;
     2102                }
     2103
     2104                // If a meta box doesn't work in the block editor, don't show it in the block editor.
     2105                if ( isset( $meta_box['args']['__block_editor_compatible_meta_box'] ) && ! $meta_box['args']['__block_editor_compatible_meta_box'] ) {
     2106                    continue;
     2107                }
     2108
    20992109                $meta_boxes_per_location[ $location ][] = array(
    21002110                    'id'    => $meta_box['id'],
Note: See TracChangeset for help on using the changeset viewer.