Tests: Fix tests broken in PHP 5.x after [43879].

Props pento.
Merges [43883] to trunk.
See #45290.
Built from https://develop.svn.wordpress.org/trunk@44242


git-svn-id: http://core.svn.wordpress.org/trunk@44072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov
2018-12-17 03:19:38 +00:00
parent 7f8d6eccd0
commit 659ca2bd1e
3 changed files with 7 additions and 2 deletions

View File

@@ -2045,6 +2045,11 @@ function use_block_editor_for_post( $post ) {
return false;
}
// The posts page can't be edited in the block editor.
if ( absint( get_option( 'page_for_posts' ) ) === $post->ID && empty( $post->post_content ) ) {
return false;
}
$use_block_editor = use_block_editor_for_post_type( $post->post_type );
/**