Ticket #45206: 45206.patch
File 45206.patch, 2.2 KB (added by , 5 years ago) |
---|
-
wp-admin/includes/template.php
1052 1052 if ( false == $box || ! $box['title'] ) 1053 1053 continue; 1054 1054 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' ] ) ) { 1059 1056 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 } 1064 1061 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 } 1070 1066 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 } 1074 1077 } 1075 1078 1076 1079 $i++;