WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/14/2011 04:59:45 PM (10 years ago)
Author:
ryan
Message:

Fix edit.php row action redirects when referrers are not sent. Return false from wp_get_referer() when no referrer found. Props mitchoyoshitaka. fixes #17628

File:
1 edited

Legend:

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

    r19093 r19272  
    8383
    8484$sendback = wp_get_referer();
    85 if ( strpos($sendback, 'post.php') !== false || strpos($sendback, 'post-new.php') !== false ) {
    86     $sendback = admin_url('edit.php');
    87     $sendback .= ( !empty( $post_type ) ) ? '?post_type=' . $post_type : '';
     85if ( ! $sendback ||
     86     strpos( $sendback, 'post.php' ) !== false ||
     87     strpos( $sendback, 'post-new.php' ) !== false ) {
     88    $sendback = admin_url( 'edit.php' );
     89    $sendback .= ( ! empty( $post_type ) ) ? '?post_type=' . $post_type : '';
    8890} else {
    8991    $sendback = remove_query_arg( array('trashed', 'untrashed', 'deleted', 'ids'), $sendback );
Note: See TracChangeset for help on using the changeset viewer.