WordPress.org

Make WordPress Core

Ticket #45537: 45537.diff

File 45537.diff, 720 bytes (added by cameronjonesweb, 16 months ago)
  • src/wp-admin/includes/post.php

    diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php
    index ea583a9847..1f8d945f2a 100644
    a b function use_block_editor_for_post( $post ) { 
    18961896                return false;
    18971897        }
    18981898
     1899        $use_block_editor = use_block_editor_for_post_type( $post->post_type );
     1900
    18991901        // The posts page can't be edited in the block editor.
    19001902        if ( absint( get_option( 'page_for_posts' ) ) === $post->ID && empty( $post->post_content ) ) {
    1901                 return false;
     1903                $use_block_editor = false;
    19021904        }
    19031905
    1904         $use_block_editor = use_block_editor_for_post_type( $post->post_type );
    1905 
    19061906        /**
    19071907         * Filter whether a post is able to be edited in the block editor.
    19081908         *