PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / 4.7.0
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance v4.7.0
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
← All changes | includes/class-updraft-email-logger.php +24 -21 3.2.20 → 4.7.0 View file →
@@ -8,8 +8,11 @@
8 8 * Class Updraft_Email_Logger
9 9 */
10 10 class Updraft_Email_Logger extends Updraft_Abstract_Logger {
11 11
12 + /**
13 + * @var bool
14 + */
12 15 protected $allow_multiple = true;
13 16
14 17 /**
15 18 * Updraft_Email_Logger constructor
@@ -44,11 +47,11 @@
44 47 * Emergency message
45 48 *
46 49 * @param string $message
47 50 * @param array $context
48 - * @return null|void
51 + * @return void
49 52 */
50 - public function emergency($message, array $context = array()) {
53 + public function emergency($message, $context = array()) {
51 54 $this->log($message, Updraft_Log_Levels::EMERGENCY, $context);
52 55 }
53 56
54 57 /**
@@ -55,11 +58,11 @@
55 58 * Alert message
56 59 *
57 60 * @param string $message
58 61 * @param array $context
59 - * @return null|void
62 + * @return void
60 63 */
61 - public function alert($message, array $context = array()) {
64 + public function alert($message, $context = array()) {
62 65 $this->log($message, Updraft_Log_Levels::ALERT, $context);
63 66 }
64 67
65 68 /**
@@ -66,11 +69,11 @@
66 69 * Critical message
67 70 *
68 71 * @param string $message
69 72 * @param array $context
70 - * @return null|void
73 + * @return void
71 74 */
72 - public function critical($message, array $context = array()) {
75 + public function critical($message, $context = array()) {
73 76 $this->log($message, Updraft_Log_Levels::CRITICAL, $context);
74 77 }
75 78
76 79 /**
@@ -77,11 +80,11 @@
77 80 * Error message
78 81 *
79 82 * @param string $message
80 83 * @param array $context
81 - * @return null|void
84 + * @return void
82 85 */
83 - public function error($message, array $context = array()) {
86 + public function error($message, $context = array()) {
84 87 $this->log($message, Updraft_Log_Levels::ERROR, $context);
85 88 }
86 89
87 90 /**
@@ -88,11 +91,11 @@
88 91 * Warning message
89 92 *
90 93 * @param string $message
91 94 * @param array $context
92 - * @return null|void
95 + * @return void
93 96 */
94 - public function warning($message, array $context = array()) {
97 + public function warning($message, $context = array()) {
95 98 $this->log($message, Updraft_Log_Levels::WARNING, $context);
96 99 }
97 100
98 101 /**
@@ -99,11 +102,11 @@
99 102 * Notice message
100 103 *
101 104 * @param string $message
102 105 * @param array $context
103 - * @return null|void
106 + * @return void
104 107 */
105 - public function notice($message, array $context = array()) {
108 + public function notice($message, $context = array()) {
106 109 $this->log($message, Updraft_Log_Levels::NOTICE, $context);
107 110 }
108 111
109 112 /**
@@ -110,11 +113,11 @@
110 113 * Info message
111 114 *
112 115 * @param string $message
113 116 * @param array $context
114 - * @return null|void
117 + * @return void
115 118 */
116 - public function info($message, array $context = array()) {
119 + public function info($message, $context = array()) {
117 120 $this->log($message, Updraft_Log_Levels::INFO, $context);
118 121 }
119 122
120 123 /**
@@ -121,11 +124,11 @@
121 124 * Debug message
122 125 *
123 126 * @param string $message
124 127 * @param array $context
125 - * @return null|void
128 + * @return void
126 129 */
127 - public function debug($message, array $context = array()) {
130 + public function debug($message, $context = array()) {
128 131 $this->log($message, Updraft_Log_Levels::DEBUG, $context);
129 132 }
130 133
131 134 /**
@@ -133,13 +136,13 @@
133 136 *
134 137 * @param string $message
135 138 * @param mixed $level
136 139 * @param array $context
137 - * @return null|void
140 + * @return void
138 141 */
139 - public function log($message, $level, array $context = array()) {
142 + public function log($message, $level, $context = array()) {
140 143
141 - if (!$this->is_enabled()) return false;
144 + if (!$this->is_enabled()) return;
142 145
143 146 $log = WP_Optimize()->get_options()->get_option('updraft_mail_logger_log', array());
144 147
145 148 $message = '['.Updraft_Log_Levels::to_text($level).'] : '.$this->interpolate($message, $context);
@@ -161,9 +164,9 @@
161 164
162 165 /**
163 166 * Return list of recipients email
164 167 *
165 - * @return null
168 + * @return mixed
166 169 */
167 170 public function get_emails() {
168 171 return $this->get_option('emails', get_option('admin_email'));
169 172 }
@@ -189,9 +192,9 @@
189 192
190 193 /**
191 194 * Return log messages
192 195 *
193 - * @return mixed|void
196 + * @return mixed
194 197 */
195 198 public function get_log() {
196 199 return WP_Optimize()->get_options()->get_option('updraft_mail_logger_log', array());
197 200 }