has_active function with ogrealert/has_active filter.

This commit is contained in:
dcooperdalrymple
2022-04-13 09:47:35 -05:00
parent bb08ce8a51
commit 60e924ba32
2 changed files with 6 additions and 4 deletions

View File

@@ -140,6 +140,9 @@ class Alert {
return apply_filters('ogrealert/get_active', $alerts);
}
public static function has_active() {
return apply_filters('ogrealert/has_active', !empty(self::get_active()));
}
public static function get_random() {
$alerts = self::get_active();