Changeset 43838
- Timestamp:
- 10/29/2018 03:15:11 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/src/wp-admin/includes/template.php
r43830 r43838 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 } 1059 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 } 1064 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 } 1070 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'] ); 1055 if ( is_array( $box[ 'args' ] ) ) { 1056 // If a meta box is just here for back compat, don't show it in the block editor. 1057 if ( $screen->is_block_editor() && isset( $box['args']['__back_compat_meta_box'] ) && $box['args']['__back_compat_meta_box'] ) { 1058 continue; 1059 } 1060 1061 // If a meta box doesn't work in the block editor, don't show it in the block editor. 1062 if ( $screen->is_block_editor() && isset( $box['args']['__block_editor_compatible_meta_box'] ) && ! $box['args']['__block_editor_compatible_meta_box'] ) { 1063 continue; 1064 } 1065 1066 $block_compatible = true; 1067 if ( isset( $box['args']['__block_editor_compatible_meta_box'] ) ) { 1068 $block_compatible = (bool) $box['args']['__block_editor_compatible_meta_box']; 1069 unset( $box['args']['__block_editor_compatible_meta_box'] ); 1070 } 1071 1072 if ( isset( $box['args']['__back_compat_meta_box'] ) ) { 1073 $block_compatible = $block_compatible || (bool) $box['args']['__back_compat_meta_box']; 1074 unset( $box['args']['__back_compat_meta_box'] ); 1075 } 1074 1076 } 1075 1077
Note: See TracChangeset
for help on using the changeset viewer.