diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php
index 2cb9dd3e1c..6a57dda7f9 100644
--- a/wp-admin/edit-form-advanced.php
+++ b/wp-admin/edit-form-advanced.php
@@ -78,7 +78,7 @@ $post_ID = isset( $post_ID ) ? (int) $post_ID : 0;
$user_ID = isset( $user_ID ) ? (int) $user_ID : 0;
$action = isset( $action ) ? $action : '';
-if ( (int) get_option( 'page_for_posts' ) === $post_ID && empty( $post->post_content ) ) {
+if ( (int) get_option( 'page_for_posts' ) === $post->ID && empty( $post->post_content ) ) {
add_action( 'edit_form_after_title', '_wp_posts_page_notice' );
remove_post_type_support( $post_type, 'editor' );
}
@@ -94,7 +94,7 @@ if ( ! $thumbnail_support && 'attachment' === $post_type && $post->post_mime_typ
if ( $thumbnail_support ) {
add_thickbox();
- wp_enqueue_media( array( 'post' => $post_ID ) );
+ wp_enqueue_media( array( 'post' => $post->ID ) );
}
// Add the local autosave notice HTML.
@@ -103,7 +103,7 @@ add_action( 'admin_footer', '_local_storage_notice' );
/*
* @todo Document the $messages array(s).
*/
-$permalink = get_permalink( $post_ID );
+$permalink = get_permalink( $post->ID );
if ( ! $permalink ) {
$permalink = '';
}
@@ -237,12 +237,12 @@ if ( 'auto-draft' === $post->post_status ) {
$autosave = false;
$form_extra .= "";
} else {
- $autosave = wp_get_post_autosave( $post_ID );
+ $autosave = wp_get_post_autosave( $post->ID );
}
$form_action = 'editpost';
-$nonce_action = 'update-post_' . $post_ID;
-$form_extra .= "";
+$nonce_action = 'update-post_' . $post->ID;
+$form_extra .= "";
// Detect if there exists an autosave newer than the post and if that autosave is different than the post.
if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt, false ) > mysql2date( 'U', $post->post_modified_gmt, false ) ) {
@@ -621,7 +621,7 @@ if ( post_type_supports( $post_type, 'editor' ) ) {
post_status ) {
echo '';
- $last_user = get_userdata( get_post_meta( $post_ID, '_edit_last', true ) );
+ $last_user = get_userdata( get_post_meta( $post->ID, '_edit_last', true ) );
if ( $last_user ) {
/* translators: 1: Name of most recent post author, 2: Post edited date, 3: Post edited time. */
printf( __( 'Last edited by %1$s on %2$s at %3$s' ), esc_html( $last_user->display_name ), mysql2date( __( 'F j, Y' ), $post->post_modified ), mysql2date( __( 'g:i a' ), $post->post_modified ) );
diff --git a/wp-admin/edit-form-blocks.php b/wp-admin/edit-form-blocks.php
index c2d6b8b965..2127fc9d4c 100644
--- a/wp-admin/edit-form-blocks.php
+++ b/wp-admin/edit-form-blocks.php
@@ -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(
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 801232fa51..9a918969f3 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
-$wp_version = '5.8-alpha-50692';
+$wp_version = '5.8-alpha-50693';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.