Make WordPress Core

Ticket #45206: 45206.patch

File 45206.patch, 2.2 KB (added by johnjamesjacoby, 5 years ago)
  • wp-admin/includes/template.php

     
    10521052                                        if ( false == $box || ! $box['title'] )
    10531053                                                continue;
    10541054
    1055                                         // Don't show boxes in the block editor, if they're just here for back compat.
    1056                                         if ( $screen->is_block_editor() && isset( $box['args']['__back_compat_meta_box'] ) && $box['args']['__back_compat_meta_box'] ) {
    1057                                                 continue;
    1058                                         }
     1055                                        if ( is_array( $box[ 'args' ] ) ) {
    10591056
    1060                                         // Don't show boxes in the block editor that aren't compatible with the block editor.
    1061                                         if ( $screen->is_block_editor() && isset( $box['args']['__block_editor_compatible_meta_box'] ) && ! $box['args']['__block_editor_compatible_meta_box'] ) {
    1062                                                 continue;
    1063                                         }
     1057                                                // Don't show boxes in the block editor, if they're just here for back compat.
     1058                                                if ( $screen->is_block_editor() && isset( $box['args']['__back_compat_meta_box'] ) && $box['args']['__back_compat_meta_box'] ) {
     1059                                                        continue;
     1060                                                }
    10641061
    1065                                         $block_compatible = true;
    1066                                         if ( isset( $box['args']['__block_editor_compatible_meta_box'] ) ) {
    1067                                                 $block_compatible = (bool) $box['args']['__block_editor_compatible_meta_box'];
    1068                                                 unset( $box['args']['__block_editor_compatible_meta_box'] );
    1069                                         }
     1062                                                // Don't show boxes in the block editor that aren't compatible with the block editor.
     1063                                                if ( $screen->is_block_editor() && isset( $box['args']['__block_editor_compatible_meta_box'] ) && ! $box['args']['__block_editor_compatible_meta_box'] ) {
     1064                                                        continue;
     1065                                                }
    10701066
    1071                                         if ( isset( $box['args']['__back_compat_meta_box'] ) ) {
    1072                                                 $block_compatible |= (bool) $box['args']['__back_compat_meta_box'];
    1073                                                 unset( $box['args']['__back_compat_meta_box'] );
     1067                                                $block_compatible = true;
     1068                                                if ( isset( $box['args']['__block_editor_compatible_meta_box'] ) ) {
     1069                                                        $block_compatible = (bool) $box['args']['__block_editor_compatible_meta_box'];
     1070                                                        unset( $box['args']['__block_editor_compatible_meta_box'] );
     1071                                                }
     1072
     1073                                                if ( isset( $box['args']['__back_compat_meta_box'] ) ) {
     1074                                                        $block_compatible |= (bool) $box['args']['__back_compat_meta_box'];
     1075                                                        unset( $box['args']['__back_compat_meta_box'] );
     1076                                                }
    10741077                                        }
    10751078
    10761079                                        $i++;