WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/28/2009 02:46:08 AM (12 years ago)
Author:
azaozz
Message:

Undo for posts, pages and media, props caesarsgrunt, see #4529

File:
1 edited

Legend:

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

    r12064 r12121  
    157157        wp_die( __('Error in moving to trash...') );
    158158
    159     $sendback = wp_get_referer();
     159    $sendback = remove_query_arg( array('trashed', 'untrashed', 'deleted', 'ids'), wp_get_referer() );
    160160    if ( strpos($sendback, 'page.php') !== false || strpos($sendback, 'page-new.php') !== false )
    161         $sendback = admin_url('edit-pages.php?trashed=1');
     161        $sendback = admin_url('edit-pages.php?trashed=1&ids='.$post_id);
    162162    else
    163         $sendback = add_query_arg('trashed', 1, $sendback);
     163        $sendback = add_query_arg( array('trashed' => 1, ids => $post_id), $sendback );
    164164
    165165    wp_redirect($sendback);
Note: See TracChangeset for help on using the changeset viewer.