Make WordPress Core


Ignore:
Timestamp:
09/20/2019 08:52:58 PM (6 years ago)
Author:
desrosj
Message:

Networks and Sites: Add support for the extra_tablenav() method in WP_MS_Sites_List_Table.

This method allows additional filters or other UI components to be added to the top and bottom of the WP_List_Table between the bulk actions dropdown and search input field.

Fixes #45954.
Props pbiron, desrosj.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/network/sites.php

    r45932 r46211  
    232232                    exit();
    233233                }
    234             } else {
    235                 $location = network_admin_url( 'sites.php' );
    236                 if ( ! empty( $_REQUEST['paged'] ) ) {
    237                     $location = add_query_arg( 'paged', (int) $_REQUEST['paged'], $location );
    238                 }
    239                 wp_redirect( $location );
    240                 exit();
     234            } elseif ( ! empty( $_GET['_wp_http_referer'] ) ) {
     235                // process query defined by WP_MS_Site_List_Table::extra_table_nav().
     236                wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) );
     237                exit;
    241238            }
     239
    242240            break;
    243241
Note: See TracChangeset for help on using the changeset viewer.