Changeset 50693
- Timestamp:
- 04/09/2021 11:29:58 AM (4 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit-form-advanced.php
r48991 r50693 79 79 $action = isset( $action ) ? $action : ''; 80 80 81 if ( (int) get_option( 'page_for_posts' ) === $post _ID && empty( $post->post_content ) ) {81 if ( (int) get_option( 'page_for_posts' ) === $post->ID && empty( $post->post_content ) ) { 82 82 add_action( 'edit_form_after_title', '_wp_posts_page_notice' ); 83 83 remove_post_type_support( $post_type, 'editor' ); … … 95 95 if ( $thumbnail_support ) { 96 96 add_thickbox(); 97 wp_enqueue_media( array( 'post' => $post _ID ) );97 wp_enqueue_media( array( 'post' => $post->ID ) ); 98 98 } 99 99 … … 104 104 * @todo Document the $messages array(s). 105 105 */ 106 $permalink = get_permalink( $post _ID );106 $permalink = get_permalink( $post->ID ); 107 107 if ( ! $permalink ) { 108 108 $permalink = ''; … … 238 238 $form_extra .= "<input type='hidden' id='auto_draft' name='auto_draft' value='1' />"; 239 239 } else { 240 $autosave = wp_get_post_autosave( $post _ID );240 $autosave = wp_get_post_autosave( $post->ID ); 241 241 } 242 242 243 243 $form_action = 'editpost'; 244 $nonce_action = 'update-post_' . $post _ID;245 $form_extra .= "<input type='hidden' id='post_ID' name='post_ID' value='" . esc_attr( $post _ID ) . "' />";244 $nonce_action = 'update-post_' . $post->ID; 245 $form_extra .= "<input type='hidden' id='post_ID' name='post_ID' value='" . esc_attr( $post->ID ) . "' />"; 246 246 247 247 // Detect if there exists an autosave newer than the post and if that autosave is different than the post. … … 622 622 if ( 'auto-draft' !== $post->post_status ) { 623 623 echo '<span id="last-edit">'; 624 $last_user = get_userdata( get_post_meta( $post _ID, '_edit_last', true ) );624 $last_user = get_userdata( get_post_meta( $post->ID, '_edit_last', true ) ); 625 625 if ( $last_user ) { 626 626 /* translators: 1: Name of most recent post author, 2: Post edited date, 3: Post edited time. */ -
trunk/src/wp-admin/edit-form-blocks.php
r50647 r50693 347 347 ); 348 348 349 $autosave = wp_get_post_autosave( $post _ID );349 $autosave = wp_get_post_autosave( $post->ID ); 350 350 if ( $autosave ) { 351 351 if ( mysql2date( 'U', $autosave->post_modified_gmt, false ) > mysql2date( 'U', $post->post_modified_gmt, false ) ) {
Note: See TracChangeset
for help on using the changeset viewer.