|
78 | 78 | $user_ID = isset( $user_ID ) ? (int) $user_ID : 0; |
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' ); |
84 | 84 | } |
|
94 | 94 |
|
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 |
|
100 | 100 | // Add the local autosave notice HTML. |
|
103 | 103 | /* |
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 = ''; |
109 | 109 | } |
|
237 | 237 | $autosave = false; |
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. |
248 | 248 | if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt, false ) > mysql2date( 'U', $post->post_modified_gmt, false ) ) { |
|
621 | 621 | <?php |
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. */ |
627 | 627 | 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 ) ); |
|
0 commit comments