Changeset 8175
- Timestamp:
- 06/23/2008 10:25:27 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-form-advanced.php
r8032 r8175 23 23 $form_extra = "<input type='hidden' id='post_ID' name='post_ID' value='$post_ID' />"; 24 24 $autosave = wp_get_post_autosave( $post_id ); 25 if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt ) > mysql2date( 'U', $post->post_modified_gmt ) ) 26 $notice = sprintf( $notices[1], get_edit_post_link( $autosave->ID ) ); 25 26 // Detect if there exists an autosave newer than the post and if that autosave is different than the post 27 if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt ) > mysql2date( 'U', $post->post_modified_gmt ) ) { 28 foreach ( _wp_post_revision_fields() as $autosave_field => $_autosave_field ) { 29 if ( wp_text_diff( $autosave->$autosave_field, $post->$autosave_field ) ) { 30 $notice = sprintf( $notices[1], get_edit_post_link( $autosave->ID ) ); 31 break; 32 } 33 } 34 unset($autosave_field, $_autosave_field); 35 } 27 36 } 28 37
Note: See TracChangeset
for help on using the changeset viewer.