-
-
Save aduth/6459c96ffbb03f458af1a051473da817 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git src/wp-admin/post-new.php src/wp-admin/post-new.php | |
index 153cba2dc4..8159f04ff9 100644 | |
--- src/wp-admin/post-new.php | |
+++ src/wp-admin/post-new.php | |
@@ -6,8 +6,8 @@ | |
* @subpackage Administration | |
*/ | |
-/** Load WordPress Administration Bootstrap */ | |
-require_once( dirname( __FILE__ ) . '/admin.php' ); | |
+require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' ); | |
+require_once( ABSPATH . 'wp-admin/includes/admin.php' ); | |
/** | |
* @global string $post_type | |
@@ -66,6 +66,11 @@ if ( ! current_user_can( $post_type_object->cap->edit_posts ) || ! current_user_ | |
$post = get_default_post_to_edit( $post_type, true ); | |
$post_ID = $post->ID; | |
+WP_Screen::get( $pagenow )->is_block_editor( use_block_editor_for_post( $post ) ); | |
+ | |
+/** Load WordPress Administration Bootstrap */ | |
+require_once( dirname( __FILE__ ) . '/admin.php' ); | |
+ | |
/** This filter is documented in wp-admin/post.php */ | |
if ( apply_filters( 'replace_editor', false, $post ) !== true ) { | |
if ( use_block_editor_for_post( $post ) ) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment