Converted array() to []

This commit is contained in:
dcooperdalrymple
2022-04-13 10:18:38 -05:00
parent b3ea11c7ce
commit 24efd02e0a
5 changed files with 101 additions and 101 deletions

View File

@@ -11,25 +11,25 @@ if (!defined('ABSPATH')) exit;
class Priority {
private static $priorities = array(
private static $priorities = [
'high',
'normal',
'low',
);
];
public static function load() {
add_filter('ogrealert/get_active', array(__CLASS__, 'order'), 10, 1);
add_filter('ogrealert/get_active', [__CLASS__, 'order'], 10, 1);
}
static function order($alerts) {
if (!is_array($alerts) || empty($alerts)) return $alerts;
$_alerts = array();
$_alerts = [];
foreach ($alerts as $id) {
$_alerts[] = array(
$_alerts[] = [
'id' => $id,
'priority' => self::get($id),
);
];
}
usort($_alerts, function ($a, $b) {