WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/24/2013 06:08:14 AM (8 years ago)
Author:
nacin
Message:

Revisions changes.

  • Eliminates the bloated Revisions meta box in favor of 'Revisions: #' in the publish box.
  • Adds ability to compare autosave to current post, when revisions are disabled.
  • Makes autosaves stand out visually, including "Restore This Autosave".

Also:

  • Adds missing capability check for restoring a revision.
  • When no revision matches the post's current modified time, avoid marking an autosave as 'current'.
  • Fixes wp_get_post_autosave() to return an autosave even when revisions are disabled.
  • Add 'check_enabled' arg to wp_get_post_revisions(); false avoids the wp_revisions_enabled() check.
  • Adds a responsive slider that is narrower for fewer versions. props markjaquith.

see #24804.

File:
1 edited

Legend:

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

    r24713 r24790  
    21002100
    21012101    // Really just pre-loading the cache here.
    2102     if ( ! $revisions = wp_get_post_revisions( $post->ID ) )
     2102    if ( ! $revisions = wp_get_post_revisions( $post->ID, array( 'check_enabled' => false ) ) )
    21032103        wp_send_json_error();
    21042104
Note: See TracChangeset for help on using the changeset viewer.