updated plugin Jetpack Protect
version 2.0.0
This commit is contained in:
@ -449,7 +449,6 @@ class Jetpack_Protect {
|
||||
return array(
|
||||
'ipAllowListCount' => Waf_Stats::get_ip_allow_list_count(),
|
||||
'ipBlockListCount' => Waf_Stats::get_ip_block_list_count(),
|
||||
'rulesVersion' => Waf_Stats::get_rules_version(),
|
||||
'automaticRulesLastUpdated' => Waf_Stats::get_automatic_rules_last_updated(),
|
||||
);
|
||||
}
|
||||
|
@ -290,21 +290,14 @@ class Status {
|
||||
$threats,
|
||||
function ( $a, $b ) {
|
||||
// sort primarily based on the presence of threats
|
||||
if ( ! empty( $a->threats ) && empty( $b->threats ) ) {
|
||||
return -1;
|
||||
}
|
||||
if ( empty( $a->threats ) && ! empty( $b->threats ) ) {
|
||||
return 1;
|
||||
}
|
||||
$ret = empty( $a->threats ) <=> empty( $b->threats );
|
||||
|
||||
// sort secondarily on whether the item has been checked
|
||||
if ( $a->checked && ! $b->checked ) {
|
||||
return 1;
|
||||
}
|
||||
if ( ! $a->checked && $b->checked ) {
|
||||
return -1;
|
||||
if ( ! $ret ) {
|
||||
$ret = $a->checked <=> $b->checked;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return $ret;
|
||||
}
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user