Make WordPress Core


Ignore:
Timestamp:
07/11/2013 10:56:48 PM (12 years ago)
Author:
markjaquith
Message:

Revisions: real URLs and preloading of the requested diff.

  • Real URLs are being used now, using pushState. ?revision={id} or ?from={from}&to={to}.
  • Drop the redundant action=edit from the URLs (this is the default).
  • The initial comparison is preloaded, whether a single revision or a compare-two situation.

See #24425.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/revision.php

    r24643 r24664  
    1212require ABSPATH . 'wp-admin/includes/revision.php';
    1313
    14 wp_reset_vars( array( 'revision', 'action' ) );
     14wp_reset_vars( array( 'revision', 'action', 'from', 'to' ) );
    1515
    1616$revision_id = absint( $revision );
     17$from = absint( $from );
     18if ( ! $revision_id )
     19    $revision_id = absint( $to );
    1720$redirect = 'edit.php';
    1821
     
    8083
    8184wp_enqueue_script( 'revisions' );
    82 wp_localize_script( 'revisions', '_wpRevisionsSettings', wp_prepare_revisions_for_js( $post, $revision_id ) );
     85wp_localize_script( 'revisions', '_wpRevisionsSettings', wp_prepare_revisions_for_js( $post, $revision_id, $from ) );
    8386
    8487/* Revisions Help Tab */
Note: See TracChangeset for help on using the changeset viewer.