diff --git src/wp-admin/edit-form-blocks.php src/wp-admin/edit-form-blocks.php
index 5556bd7..6ead6de 100644
|
|
if ( ! defined( 'ABSPATH' ) ) { |
23 | 23 | */ |
24 | 24 | global $post_type, $post_type_object, $post, $title, $editor_styles, $wp_meta_boxes; |
25 | 25 | |
26 | | // Flag that we're loading the block editor. |
27 | 26 | $current_screen = get_current_screen(); |
28 | | $current_screen->is_block_editor( true ); |
29 | 27 | |
30 | 28 | /* |
31 | 29 | * Emoji replacement is disabled for now, until it plays nicely with React. |
diff --git src/wp-admin/includes/class-wp-screen.php src/wp-admin/includes/class-wp-screen.php
index 21094b8..97c0b6b 100644
|
|
final class WP_Screen { |
202 | 202 | return $hook_name; |
203 | 203 | } |
204 | 204 | |
205 | | $post_type = $taxonomy = null; |
206 | | $in_admin = false; |
207 | | $action = ''; |
| 205 | $post_type = $taxonomy = null; |
| 206 | $in_admin = false; |
| 207 | $action = ''; |
| 208 | $is_block_editor = false; |
208 | 209 | |
209 | 210 | if ( $hook_name ) { |
210 | 211 | $id = $hook_name; |
… |
… |
final class WP_Screen { |
293 | 294 | if ( $post_id ) { |
294 | 295 | $post = get_post( $post_id ); |
295 | 296 | if ( $post ) { |
296 | | $post_type = $post->post_type; |
| 297 | $post_type = $post->post_type; |
| 298 | $is_block_editor = use_block_editor_for_post( $post ); |
297 | 299 | } |
| 300 | } else { |
| 301 | if ( null === $post_type ) { |
| 302 | $post_type = 'post'; |
| 303 | } |
| 304 | $is_block_editor = use_block_editor_for_post_type( $post_type ); |
298 | 305 | } |
299 | 306 | break; |
300 | 307 | case 'edit-tags': |
… |
… |
final class WP_Screen { |
357 | 364 | $screen->id = $id; |
358 | 365 | } |
359 | 366 | |
360 | | $screen->base = $base; |
361 | | $screen->action = $action; |
362 | | $screen->post_type = (string) $post_type; |
363 | | $screen->taxonomy = (string) $taxonomy; |
364 | | $screen->is_user = ( 'user' == $in_admin ); |
365 | | $screen->is_network = ( 'network' == $in_admin ); |
366 | | $screen->in_admin = $in_admin; |
| 367 | $screen->base = $base; |
| 368 | $screen->action = $action; |
| 369 | $screen->post_type = (string) $post_type; |
| 370 | $screen->taxonomy = (string) $taxonomy; |
| 371 | $screen->is_user = ( 'user' == $in_admin ); |
| 372 | $screen->is_network = ( 'network' == $in_admin ); |
| 373 | $screen->in_admin = $in_admin; |
| 374 | $screen->is_block_editor = $is_block_editor; |
367 | 375 | |
368 | 376 | self::$_registry[ $id ] = $screen; |
369 | 377 | |