Network Admin: Improve Site States in List Table rows.
This commit switches a comparison to a Yoda condition, performs a more strict `intval()` check on the value of the Site Status column, and prevents a specific Site State from appearing in List Table rows when filtering by that same Site State already (to match the behavior of other List Table State implementations.) Fixes #37684. Props pbiron. Built from https://develop.svn.wordpress.org/trunk@46441 git-svn-id: http://core.svn.wordpress.org/trunk@46239 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a0a037db4d
commit
477f0ffd71
|
@ -617,8 +617,9 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
|
||||||
|
|
||||||
reset( $this->status_list );
|
reset( $this->status_list );
|
||||||
|
|
||||||
|
$site_status = isset( $_REQUEST['status'] ) ? wp_unslash( trim( $_REQUEST['status'] ) ) : '';
|
||||||
foreach ( $this->status_list as $status => $col ) {
|
foreach ( $this->status_list as $status => $col ) {
|
||||||
if ( $_site->{$status} == 1 ) {
|
if ( ( 1 === intval( $_site->{$status} ) ) && ( $site_status !== $status ) ) {
|
||||||
$site_states[ $col[0] ] = $col[1];
|
$site_states[ $col[0] ] = $col[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.3-beta2-46440';
|
$wp_version = '5.3-beta2-46441';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue