PluginProbe
Import WP – CSV & XML Import Export for WordPress / 2.15.0
Import WP – CSV & XML Import Export for WordPress v2.15.0
2.15.1 2.15.0 2.14.24 2.14.23 2.7.0 2.7.1 2.7.10 2.7.11 2.7.12 2.7.13 2.7.14 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.9.0 2.9.1 All 144 releases
← All changes | class/Common/Util/Logger.php +10 -0 2.7.3 → 2.15.0 View file →
@@ -11,8 +11,9 @@
11 11 {
12 12 private static $id = null;
13 13 private static $requestType = null;
14 14 private static $time = -1;
15 + private static $disabled = false;
15 16
16 17 public static function setId($id = null)
17 18 {
18 19 self::$id = $id;
@@ -17,8 +18,13 @@
17 18 {
18 19 self::$id = $id;
19 20 }
20 21
22 + public static function disable()
23 + {
24 + self::$disabled = true;
25 + }
26 +
21 27 public static function setRequestType($requestType = null)
22 28 {
23 29 self::$requestType = $requestType;
24 30 }
@@ -51,8 +57,12 @@
51 57 file_put_contents($log_file, '');
52 58 }
53 59 public static function write($message, $id = null, $type = 'DEBUG')
54 60 {
61 + if (self::$disabled) {
62 + return;
63 + }
64 +
55 65 if (is_null($id) && !is_null(self::$id) && intval(self::$id) > 0) {
56 66 $id = self::$id;
57 67 }
58 68