Make WordPress Core


Ignore:
Timestamp:
04/04/2013 04:03:21 PM (13 years ago)
Author:
markjaquith
Message:

A little more revisions js/php cleanup. see #23901. props kovshenin, ocean90.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/ajax-actions.php

    r23898 r23904  
    21872187
    21882188        $revision_from_date_author = '';
     2189        $is_current_revision = false;
    21892190        $count++;
    21902191        // return blank data for diffs to the left of the left handle (for right handel model)
     
    22362237            $revision_from_date_author = sprintf( $autosavef, $revision_from_date_author );
    22372238
    2238         if ( $revision->post_modified === $post->post_modified )
     2239        if ( $revision->post_modified === $post->post_modified ) {
    22392240            $revision_date_author = sprintf( $currentf, $revision_date_author );
    2240         elseif ( wp_is_post_autosave( $revision ) )
     2241            $is_current_revision = true;
     2242        } elseif ( wp_is_post_autosave( $revision ) ) {
    22412243            $revision_date_author = sprintf( $autosavef, $revision_date_author );
     2244        }
    22422245
    22432246        /* translators: revision date short format, see http://php.net/date */
     
    22762279                'restoreLink'          => urldecode( $restore_link ),
    22772280                'revision_toload'      => true,
    2278                 'previous_revision_id' => $previous_revision_id
     2281                'previous_revision_id' => $previous_revision_id,
     2282                'is_current_revision'  => $is_current_revision,
    22792283            );
    22802284        }
Note: See TracChangeset for help on using the changeset viewer.