mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-13 05:10:18 +00:00
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@24664 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -11,9 +11,12 @@ require_once('./admin.php');
|
||||
|
||||
require ABSPATH . 'wp-admin/includes/revision.php';
|
||||
|
||||
wp_reset_vars( array( 'revision', 'action' ) );
|
||||
wp_reset_vars( array( 'revision', 'action', 'from', 'to' ) );
|
||||
|
||||
$revision_id = absint( $revision );
|
||||
$from = absint( $from );
|
||||
if ( ! $revision_id )
|
||||
$revision_id = absint( $to );
|
||||
$redirect = 'edit.php';
|
||||
|
||||
switch ( $action ) :
|
||||
@@ -79,7 +82,7 @@ else
|
||||
$parent_file = $submenu_file = 'edit.php';
|
||||
|
||||
wp_enqueue_script( 'revisions' );
|
||||
wp_localize_script( 'revisions', '_wpRevisionsSettings', wp_prepare_revisions_for_js( $post, $revision_id ) );
|
||||
wp_localize_script( 'revisions', '_wpRevisionsSettings', wp_prepare_revisions_for_js( $post, $revision_id, $from ) );
|
||||
|
||||
/* Revisions Help Tab */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user