PluginProbe
WebTotem Security / 1.0
WebTotem Security v1.0
3.0.1 3.0.0 trunk 1.0 1.1 1.2 1.3 1.3.1 1.3.2 1.3.3 2.0 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.1 2.2.2 2.2.3 2.2.4 All 109 releases
wt-security / library / Session.php

Session.php in WebTotem Security 1.0, at library/Session.php

42 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php defined('ABSPATH') or die("Protected By WT!");
2
3
4 class WTSEC_LIBRARY_Session
5 {
6 public static function notifications()
7 {
8 $notification_types = [
9 "error","info","warning","success"
10 ];
11 foreach ($notification_types as $type) {
12 if ($notifications = get_option(WTSEC_PLUGIN_PREFIX.$type)) {
13 if(is_array($notifications)) {
14 foreach ($notifications as $notification) {
15 echo '<div class="ww-main ww-main--grid" id="ww-alert" title="" data-tlite="">
16 <div class="ww-alert ww-alert--'.$type.'" title="" data-tlite="">
17 <div class="ww-alert__info">'.strtoupper($type).':</div>
18 <div class="ww-alert__text" title="" data-tlite="">'.$notification.'</div><button class="ww-alert__close" type="button" onclick="removeAlert()">
19 <div class="ww-icon ww-icon--close"></div>
20 </button>
21 </div>
22 </div>';
23 }
24 }
25 self::deleteNotification($type);
26 }
27 }
28 }
29
30 protected static function deleteNotification($name){
31 return delete_option(WTSEC_PLUGIN_PREFIX.$name);
32 }
33
34 public static function setNotification($type,$value){
35 if($notifications = get_option(WTSEC_PLUGIN_PREFIX.$type)){
36 $notifications[] = $value;
37 update_option(WTSEC_PLUGIN_PREFIX.$type,$notifications);
38 }else{
39 update_option(WTSEC_PLUGIN_PREFIX.$type,[$value]);
40 }
41 }
42 }