Make WordPress Core

Ticket #37684: 37684.4.diff

File 37684.4.diff, 1.1 KB (added by pbiron, 6 years ago)
  • src/wp-admin/includes/class-wp-ms-sites-list-table.php

    From ab6d5606bbecbc143d809b59915c14ac2dd54476 Mon Sep 17 00:00:00 2001
    From: Paul Biron <paul@sparrowhawkcomputing.com>
    Date: Fri, 4 Oct 2019 16:16:48 -0600
    Subject: [PATCH] Exclude a status from the default display states if the list
     table is filtered by that status.
    
    ---
     src/wp-admin/includes/class-wp-ms-sites-list-table.php | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/src/wp-admin/includes/class-wp-ms-sites-list-table.php b/src/wp-admin/includes/class-wp-ms-sites-list-table.php
    index 5f15b5a1c1..30d4ce5f4b 100644
    a b class WP_MS_Sites_List_Table extends WP_List_Table { 
    617617
    618618                reset( $this->status_list );
    619619
     620                $site_status = isset( $_REQUEST['status'] ) ? $_REQUEST['status'] : '';
    620621                foreach ( $this->status_list as $status => $col ) {
    621                         if ( $_site->{$status} == 1 ) {
     622                        if ( $_site->{$status} == 1 && $site_status !== $status ) {
    622623                                $site_states[ $col[0] ] = $col[1];
    623624                        }
    624625                }