| 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 | } |
|---|