Changeset 45224 for trunk/src/wp-admin/includes/class-wp-screen.php
- Timestamp:
- 04/17/2019 01:55:21 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-screen.php
r44574 r45224 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 ) { … … 295 296 if ( $post ) { 296 297 $post_type = $post->post_type; 298 299 /** This filter is documented in wp-admin/post.php */ 300 $replace_editor = apply_filters( 'replace_editor', false, $post ); 301 302 if ( ! $replace_editor ) { 303 $is_block_editor = use_block_editor_for_post( $post ); 304 } 297 305 } 298 306 } … … 315 323 $post_type = 'post'; 316 324 } 325 326 // When creating a new post, use the default block editor support value for the post type. 327 if ( empty( $post_id ) ) { 328 $is_block_editor = use_block_editor_for_post_type( $post_type ); 329 } 330 317 331 $id = $post_type; 318 332 break; … … 358 372 } 359 373 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; 374 $screen->base = $base; 375 $screen->action = $action; 376 $screen->post_type = (string) $post_type; 377 $screen->taxonomy = (string) $taxonomy; 378 $screen->is_user = ( 'user' == $in_admin ); 379 $screen->is_network = ( 'network' == $in_admin ); 380 $screen->in_admin = $in_admin; 381 $screen->is_block_editor = $is_block_editor; 367 382 368 383 self::$_registry[ $id ] = $screen;
Note: See TracChangeset
for help on using the changeset viewer.