| 180 | /** |
| 181 | * If we only have one revision, the initial revision is missing; The only way this happens is |
| 182 | * when we have an autsosave and the user has clicked 'View the Autosave' |
| 183 | */ |
| 184 | if ( 1 === sizeof( $revisions ) ) { |
| 185 | $revisions[ $post->ID ] = array( |
| 186 | 'id' => $post->ID, |
| 187 | 'title' => get_the_title( $post->ID ), |
| 188 | 'author' => $authors[ $post->post_author ], |
| 189 | 'date' => date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->modified ) ), |
| 190 | 'dateShort' => date_i18n( _x( 'j M @ G:i', 'revision date short format' ), strtotime( $post->modified ) ), |
| 191 | 'timeAgo' => sprintf( __( '%s ago' ), human_time_diff( strtotime( $post->$modified_gmt ), $now_gmt ) ), |
| 192 | 'autosave' => false, |
| 193 | 'current' => true, |
| 194 | 'restoreUrl' => false, |
| 195 | ); |
| 196 | $current_id = $post->ID; |
| 197 | } |
| 198 | |