| @@ -14,10 +14,12 @@ | ||
| 14 | 14 | */ |
| 15 | 15 | |
| 16 | 16 | // if there are new notifications add the indicator to the menu title. |
| 17 | 17 | $charitable_notification_count = class_exists( 'Charitable_Notifications' ) ? Charitable_Notifications::get_instance()->get_new_notifications_count() : 0; |
| 18 | -$charitable_display_text = $charitable_notification_count > 0 ? ( $charitable_notification_count > 9 ? '9+' : $charitable_notification_count ) : ''; | |
| 19 | -$charitable_indictor_html = $charitable_notification_count > 0 ? '<span class="round number">' . $charitable_display_text . '</span>' : ''; | |
| 18 | +$charitable_has_alerts = class_exists( 'Charitable_Notifications' ) ? Charitable_Notifications::get_instance()->has_alert_notifications() : false; | |
| 19 | +$charitable_display_text = $charitable_notification_count > 0 ? ( $charitable_notification_count > 9 ? '9+' : $charitable_notification_count ) : ''; | |
| 20 | +$charitable_badge_type = $charitable_has_alerts ? 'alert' : 'info'; | |
| 21 | +$charitable_indictor_html = $charitable_notification_count > 0 ? '<span class="round number ' . $charitable_badge_type . '">' . $charitable_display_text . '</span>' : ''; | |
| 20 | 22 | ?> |
| 21 | 23 | |
| 22 | 24 | <?php do_action( 'charitable_admin_before_header' ); ?> |
| 23 | 25 | |