diff --git a/src/wp-admin/css/common.css b/src/wp-admin/css/common.css index cf9c7ffe43..a8c8e612b6 100644 --- a/src/wp-admin/css/common.css +++ b/src/wp-admin/css/common.css @@ -560,6 +560,10 @@ code { margin: 10px 20px 0 2px; } +.wrap.block-editor-no-js { + padding-left: 20px; +} + .wrap > h2:first-child, /* Back-compat for pre-4.4 */ .wrap [class$="icon32"] + h2, /* Back-compat for pre-4.4 */ .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..44cfec14a8 100644 --- a/src/wp-admin/edit-form-blocks.php +++ b/src/wp-admin/edit-form-blocks.php @@ -23,10 +23,6 @@ if ( ! defined( 'ABSPATH' ) ) { */ global $post_type, $post_type_object, $post, $title, $editor_styles, $wp_meta_boxes; -if ( ! empty( $post_type_object ) ) { - $title = $post_type_object->labels->edit_item; -} - // Flag that we're loading the block editor. $current_screen = get_current_screen(); $current_screen->is_block_editor( true ); @@ -399,9 +395,36 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' ); ?>
-

labels->edit_item ); ?>

-
+

+
+ + +
+

+
+

+ Classic Editor plugin.' ), + __( 'https://wordpress.org/plugins/classic-editor/' ) + ); + + /** + * Filters the message displayed in the block editor interface when JavaScript is + * not enabled in the browser. + * + * @since 5.0.3 + * + * @param string $message The message being displayed. + * @param WP_Post $post The post being edited. + */ + echo apply_filters( 'block_editor_no_javascript_message', $message, $post ); + ?> +

+
+
diff --git a/src/wp-admin/post.php b/src/wp-admin/post.php index 8799008664..6f95adc17e 100644 --- a/src/wp-admin/post.php +++ b/src/wp-admin/post.php @@ -154,6 +154,8 @@ switch ( $action ) { $post_new_file = "post-new.php?post_type=$post_type"; } + $title = $post_type_object->labels->edit_item; + /** * Allows replacement of the editor. * @@ -179,8 +181,7 @@ switch ( $action ) { } } - $title = $post_type_object->labels->edit_item; - $post = get_post( $post_id, OBJECT, 'edit' ); + $post = get_post( $post_id, OBJECT, 'edit' ); if ( post_type_supports( $post_type, 'comments' ) ) { wp_enqueue_script( 'admin-comments' );