diff --git a/src/wp-admin/css/common.css b/src/wp-admin/css/common.css
index cf9c7ffe43..a8c8e612b6 100644
|
a
|
b
|
code { |
| 560 | 560 | margin: 10px 20px 0 2px; |
| 561 | 561 | } |
| 562 | 562 | |
| | 563 | .wrap.block-editor-no-js { |
| | 564 | padding-left: 20px; |
| | 565 | } |
| | 566 | |
| 563 | 567 | .wrap > h2:first-child, /* Back-compat for pre-4.4 */ |
| 564 | 568 | .wrap [class$="icon32"] + h2, /* Back-compat for pre-4.4 */ |
| 565 | 569 | .postbox .inside h2, /* Back-compat for pre-4.4 */ |
diff --git a/src/wp-admin/edit-form-blocks.php b/src/wp-admin/edit-form-blocks.php
index 7cf2fa3663..b91ae24fa9 100644
|
a
|
b
|
if ( ! defined( 'ABSPATH' ) ) { |
| 23 | 23 | */ |
| 24 | 24 | global $post_type, $post_type_object, $post, $title, $editor_styles, $wp_meta_boxes; |
| 25 | 25 | |
| 26 | | if ( ! empty( $post_type_object ) ) { |
| 27 | | $title = $post_type_object->labels->edit_item; |
| 28 | | } |
| 29 | | |
| 30 | 26 | // Flag that we're loading the block editor. |
| 31 | 27 | $current_screen = get_current_screen(); |
| 32 | 28 | $current_screen->is_block_editor( true ); |
| … |
… |
require_once( ABSPATH . 'wp-admin/admin-header.php' ); |
| 399 | 395 | ?> |
| 400 | 396 | |
| 401 | 397 | <div class="block-editor"> |
| 402 | | <h1 class="screen-reader-text"><?php echo esc_html( $post_type_object->labels->edit_item ); ?></h1> |
| 403 | | <div id="editor" class="block-editor__container"></div> |
| | 398 | <h1 class="screen-reader-text hide-if-no-js"><?php echo esc_html( $title ); ?></h1> |
| | 399 | <div id="editor" class="block-editor__container hide-if-no-js"></div> |
| 404 | 400 | <div id="metaboxes" class="hidden"> |
| 405 | 401 | <?php the_block_editor_meta_boxes(); ?> |
| 406 | 402 | </div> |
| | 403 | |
| | 404 | <?php // JavaScript is disabled. ?> |
| | 405 | <div class="wrap hide-if-js block-editor-no-js"> |
| | 406 | <h1 class="wp-heading-inline"><?php echo esc_html( $title ); ?></h1> |
| | 407 | <div class="error"> |
| | 408 | <p> |
| | 409 | <?php |
| | 410 | $message = printf( |
| | 411 | /** Translators: %s: https://wordpress.org/plugins/classic-editor/ */ |
| | 412 | __( 'The block editor requires JavaScript. Please enable JavaScript in your browser settings, or try the <a href="%s">Classic Editor plugin</a>.' ), |
| | 413 | __( 'https://wordpress.org/plugins/classic-editor/' ) |
| | 414 | ); |
| | 415 | |
| | 416 | /** |
| | 417 | * Filters the message displayed in the block editor interface when JavaScript is |
| | 418 | * not enabled in the browser. |
| | 419 | * |
| | 420 | * @since 5.0.3 |
| | 421 | * |
| | 422 | * @param string $message The message being displayed. |
| | 423 | * @param WP_Post $post The post being edited. |
| | 424 | */ |
| | 425 | echo apply_filters( 'block_editor_no_javascript_message', $message, $post ); |
| | 426 | ?> |
| | 427 | </p> |
| | 428 | </div> |
| | 429 | </div> |
| 407 | 430 | </div> |
diff --git a/src/wp-admin/post.php b/src/wp-admin/post.php
index 8799008664..0ea6c5bfb4 100644
|
a
|
b
|
switch ( $action ) { |
| 154 | 154 | $post_new_file = "post-new.php?post_type=$post_type"; |
| 155 | 155 | } |
| 156 | 156 | |
| | 157 | $title = $post_type_object->labels->edit_item; |
| | 158 | |
| 157 | 159 | /** |
| 158 | 160 | * Allows replacement of the editor. |
| 159 | 161 | * |
| … |
… |
switch ( $action ) { |
| 179 | 181 | } |
| 180 | 182 | } |
| 181 | 183 | |
| 182 | | $title = $post_type_object->labels->edit_item; |
| 183 | 184 | $post = get_post( $post_id, OBJECT, 'edit' ); |
| 184 | 185 | |
| 185 | 186 | if ( post_type_supports( $post_type, 'comments' ) ) { |