Make WordPress Core

Changeset 12820


Ignore:
Timestamp:
01/24/2010 08:50:50 PM (15 years ago)
Author:
markjaquith
Message:

Include post_type= when redirecting after "Trash" click from item individual edit screen, to avoid going to Post edit screen for other post_types

File:
1 edited

Legend:

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

    r12728 r12820  
    111111
    112112$sendback = wp_get_referer();
    113 if ( strpos($sendback, 'post.php') !== false || strpos($sendback, 'post-new.php') !== false )
     113if ( strpos($sendback, 'post.php') !== false || strpos($sendback, 'post-new.php') !== false ) {
    114114    $sendback = admin_url('edit.php');
    115 else
     115    $sendback .= ( !empty( $post_type ) ) ? '?post_type=' . $post_type : '';
     116} else {
    116117    $sendback = remove_query_arg( array('trashed', 'untrashed', 'deleted', 'ids'), $sendback );
     118}
    117119
    118120switch($action) {
Note: See TracChangeset for help on using the changeset viewer.