Make WordPress Core


Ignore:
Timestamp:
10/07/2016 08:05:45 PM (8 years ago)
Author:
ocean90
Message:

Taxonomy: Remove paged argument from referer and add it only if current page is greater than 1.

Props swissspidy.
See #38194.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-tags.php

    r38750 r38752  
    6565    $referer = wp_unslash( $_SERVER['REQUEST_URI'] );
    6666}
    67 $referer = remove_query_arg( array( '_wp_http_referer', '_wpnonce', 'error', 'message' ), $referer );
     67$referer = remove_query_arg( array( '_wp_http_referer', '_wpnonce', 'error', 'message', 'paged' ), $referer );
    6868
    6969switch ( $wp_list_table->current_action() ) {
     
    196196
    197197if ( $location ) {
    198     $location = add_query_arg( 'paged', $pagenum, $location ); // $pagenum takes care of $total_pages.
     198    if ( $pagenum > 1 ) {
     199        $location = add_query_arg( 'paged', $pagenum, $location ); // $pagenum takes care of $total_pages.
     200    }
    199201
    200202    /**
Note: See TracChangeset for help on using the changeset viewer.