Make WordPress Core

Changeset 44175


Ignore:
Timestamp:
12/14/2018 09:41:56 AM (6 years ago)
Author:
atimmer
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.

Props pento.
Merges [43839] to trunk.
Fixes #45207.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

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

    r44174 r44175  
    11381138                    }
    11391139
     1140                    $block_compatible = true;
    11401141                    if ( is_array( $box[ 'args' ] ) ) {
    11411142                        // If a meta box is just here for back compat, don't show it in the block editor.
     
    11491150                        }
    11501151
    1151                         $block_compatible = true;
    11521152                        if ( isset( $box['args']['__block_editor_compatible_meta_box'] ) ) {
    11531153                            $block_compatible = (bool) $box['args']['__block_editor_compatible_meta_box'];
     
    11871187                    echo '<div class="inside">' . "\n";
    11881188
    1189                     if ( WP_DEBUG && ! $screen->is_block_editor() && ! isset( $_GET['meta-box-loader'] ) ) {
     1189                    if ( WP_DEBUG && ! $block_compatible && 'edit' === $screen->parent_base && ! $screen->is_block_editor() && ! isset( $_GET['meta-box-loader'] ) ) {
    11901190                        if ( is_array( $box['callback'] ) ) {
    11911191                            $reflection = new ReflectionMethod( $box['callback'][0], $box['callback'][1] );
Note: See TracChangeset for help on using the changeset viewer.