Changeset 44174
- Timestamp:
- 12/14/2018 09:38:09 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/5.0 merged: 43838
- Property svn:mergeinfo changed
-
trunk/src/wp-admin/includes/template.php
r44170 r44174 1138 1138 } 1139 1139 1140 // Don't show boxes in the block editor, if they're just here for back compat. 1141 if ( $screen->is_block_editor() && isset( $box['args']['__back_compat_meta_box'] ) && $box['args']['__back_compat_meta_box'] ) { 1142 continue; 1143 } 1144 1145 // Don't show boxes in the block editor that aren't compatible with the block editor. 1146 if ( $screen->is_block_editor() && isset( $box['args']['__block_editor_compatible_meta_box'] ) && ! $box['args']['__block_editor_compatible_meta_box'] ) { 1147 continue; 1148 } 1149 1150 $block_compatible = true; 1151 if ( isset( $box['args']['__block_editor_compatible_meta_box'] ) ) { 1152 $block_compatible = (bool) $box['args']['__block_editor_compatible_meta_box']; 1153 unset( $box['args']['__block_editor_compatible_meta_box'] ); 1154 } 1155 1156 if ( isset( $box['args']['__back_compat_meta_box'] ) ) { 1157 $block_compatible |= (bool) $box['args']['__back_compat_meta_box']; 1158 unset( $box['args']['__back_compat_meta_box'] ); 1140 if ( is_array( $box[ 'args' ] ) ) { 1141 // If a meta box is just here for back compat, don't show it in the block editor. 1142 if ( $screen->is_block_editor() && isset( $box['args']['__back_compat_meta_box'] ) && $box['args']['__back_compat_meta_box'] ) { 1143 continue; 1144 } 1145 1146 // If a meta box doesn't work in the block editor, don't show it in the block editor. 1147 if ( $screen->is_block_editor() && isset( $box['args']['__block_editor_compatible_meta_box'] ) && ! $box['args']['__block_editor_compatible_meta_box'] ) { 1148 continue; 1149 } 1150 1151 $block_compatible = true; 1152 if ( isset( $box['args']['__block_editor_compatible_meta_box'] ) ) { 1153 $block_compatible = (bool) $box['args']['__block_editor_compatible_meta_box']; 1154 unset( $box['args']['__block_editor_compatible_meta_box'] ); 1155 } 1156 1157 if ( isset( $box['args']['__back_compat_meta_box'] ) ) { 1158 $block_compatible = $block_compatible || (bool) $box['args']['__back_compat_meta_box']; 1159 unset( $box['args']['__back_compat_meta_box'] ); 1160 } 1159 1161 } 1160 1162
Note: See TracChangeset
for help on using the changeset viewer.