Make WordPress Core


Ignore:
Timestamp:
10/29/2018 04:02:40 AM (6 years ago)
Author:
pento
Message:

Meta boxes: Don't show the block editor incompatiblity message when it doesn't apply.

We should only be showing this message in the classic editor interface, for meta boxes that are marked as being incompatible with the block editor.

Fixes #45207.

File:
1 edited

Legend:

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

    r43838 r43839  
    10531053                        continue;
    10541054
     1055                    $block_compatible = true;
    10551056                    if ( is_array( $box[ 'args' ] ) ) {
    10561057                        // If a meta box is just here for back compat, don't show it in the block editor.
     
    10641065                        }
    10651066
    1066                         $block_compatible = true;
    10671067                        if ( isset( $box['args']['__block_editor_compatible_meta_box'] ) ) {
    10681068                            $block_compatible = (bool) $box['args']['__block_editor_compatible_meta_box'];
     
    10961096                    echo '<div class="inside">' . "\n";
    10971097
    1098                     if ( WP_DEBUG && ! $screen->is_block_editor() && ! isset( $_GET['meta-box-loader'] ) ) {
     1098                    if ( WP_DEBUG && ! $block_compatible && 'edit' === $screen->parent_base && ! $screen->is_block_editor() && ! isset( $_GET['meta-box-loader'] ) ) {
    10991099                        if ( is_array( $box['callback'] ) ) {
    11001100                            $reflection = new ReflectionMethod( $box['callback'][0], $box['callback'][1] );
Note: See TracChangeset for help on using the changeset viewer.