PluginProbe
Elementor Website Builder – more than just a page builder / 3.13.2
Elementor Website Builder – more than just a page builder v3.13.2
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
← All changes | core/logger/manager.php +9 -12 4.2.03.13.2 View file →
@@ -2,9 +2,8 @@
2 2 namespace Elementor\Core\Logger;
3 3
4 4 use Elementor\Core\Base\Module as BaseModule;
5 5 use Elementor\Core\Common\Modules\Ajax\Module;
6 -use Elementor\Core\Editor\Editor;
7 6 use Elementor\Core\Logger\Loggers\Logger_Interface;
8 7 use Elementor\Core\Logger\Items\PHP;
9 8 use Elementor\Core\Logger\Items\JS;
10 9 use Elementor\Plugin;
@@ -11,9 +10,9 @@
11 10 use Elementor\Modules\System_Info\Module as System_Info;
12 11 use Elementor\Utils;
13 12
14 13 if ( ! defined( 'ABSPATH' ) ) {
15 - exit; // Exit if accessed directly.
14 + exit; // Exit if accessed directly
16 15 }
17 16
18 17 class Manager extends BaseModule {
19 18
@@ -117,8 +116,9 @@
117 116 *
118 117 * Log Elementor errors and save them in the database.
119 118 *
120 119 * Fired by `wp_ajax_elementor_js_log` action.
120 + *
121 121 */
122 122 public function js_log() {
123 123 /** @var Module $ajax */
124 124 $ajax = Plugin::$instance->common->get_component( 'ajax' );
@@ -127,12 +127,8 @@
127 127 if ( ! $ajax->verify_request_nonce() || empty( $_POST['data'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
128 128 wp_send_json_error();
129 129 }
130 130
131 - if ( ! current_user_can( Editor::EDITING_CAPABILITY ) ) {
132 - wp_send_json_error( 'Permission denied' );
133 - }
134 -
135 131 // PHPCS - See comment above.
136 132 $data = Utils::get_super_global_value( $_POST, 'data' ) ?? []; // phpcs:ignore WordPress.Security.NonceVerification.Missing
137 133
138 134 array_walk_recursive( $data, function( &$value ) {
@@ -153,10 +149,10 @@
153 149
154 150 wp_send_json_success();
155 151 }
156 152
157 - public function register_logger( $name, $class_name ) {
158 - $this->loggers[ $name ] = $class_name;
153 + public function register_logger( $name, $class ) {
154 + $this->loggers[ $name ] = $class;
159 155 }
160 156
161 157 public function set_default_logger( $name ) {
162 158 if ( ! empty( $this->loggers[ $name ] ) ) {
@@ -199,9 +195,9 @@
199 195 }
200 196
201 197 /**
202 198 * @param string $message
203 - * @param array $args
199 + * @param array $args
204 200 *
205 201 * @return void
206 202 */
207 203 public function info( $message, $args = [] ) {
@@ -209,9 +205,9 @@
209 205 }
210 206
211 207 /**
212 208 * @param string $message
213 - * @param array $args
209 + * @param array $args
214 210 *
215 211 * @return void
216 212 */
217 213 public function notice( $message, $args = [] ) {
@@ -219,9 +215,9 @@
219 215 }
220 216
221 217 /**
222 218 * @param string $message
223 - * @param array $args
219 + * @param array $args
224 220 *
225 221 * @return void
226 222 */
227 223 public function warning( $message, $args = [] ) {
@@ -229,9 +225,9 @@
229 225 }
230 226
231 227 /**
232 228 * @param string $message
233 - * @param array $args
229 + * @param array $args
234 230 *
235 231 * @return void
236 232 */
237 233 public function error( $message, $args = [] ) {
@@ -245,8 +241,9 @@
245 241 E_USER_ERROR => Logger_Interface::LEVEL_ERROR,
246 242 E_COMPILE_ERROR => Logger_Interface::LEVEL_ERROR,
247 243 E_RECOVERABLE_ERROR => Logger_Interface::LEVEL_ERROR,
248 244 E_PARSE => Logger_Interface::LEVEL_ERROR,
245 + E_STRICT => Logger_Interface::LEVEL_ERROR,
249 246
250 247 E_WARNING => Logger_Interface::LEVEL_WARNING,
251 248 E_USER_WARNING => Logger_Interface::LEVEL_WARNING,
252 249 E_CORE_WARNING => Logger_Interface::LEVEL_WARNING,