Editor: Use a consistent way to retrieve post ID on Edit Post screens.

Props mukesh27, ravipatel, davidbaumwald.
Fixes #52995.

git-svn-id: https://develop.svn.wordpress.org/trunk@50693 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2021-04-09 11:29:58 +00:00
parent 4e5569ddd3
commit c00ba50d59
2 changed files with 8 additions and 8 deletions

View File

@@ -346,7 +346,7 @@ $editor_settings = array(
'enableCustomSpacing' => $custom_spacing,
);
$autosave = wp_get_post_autosave( $post_ID );
$autosave = wp_get_post_autosave( $post->ID );
if ( $autosave ) {
if ( mysql2date( 'U', $autosave->post_modified_gmt, false ) > mysql2date( 'U', $post->post_modified_gmt, false ) ) {
$editor_settings['autosave'] = array(