updated plugin Jetpack Protect version 2.0.0

This commit is contained in:
2024-02-08 12:31:43 +00:00
committed by Gitium
parent ce653dd56c
commit 8d5e7cc070
192 changed files with 5244 additions and 2003 deletions

View File

@ -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(),
);
}

View File

@ -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;
}
);