PluginProbe
Elementor Website Builder – more than just a page builder / 3.26.4
Elementor Website Builder – more than just a page builder v3.26.4
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 | includes/user.php +11 -18 4.3.0-beta23.26.4 View file →
@@ -72,9 +72,8 @@
72 72 add_action( 'elementor/ajax/register_actions', [ __CLASS__, 'register_ajax_actions' ] );
73 73 }
74 74
75 75 /**
76 - * @param Ajax $ajax
77 76 * @since 2.1.0
78 77 * @access public
79 78 * @static
80 79 */
@@ -126,12 +125,8 @@
126 125 if ( intval( get_option( 'page_for_posts' ) ) === $post->ID ) {
127 126 return false;
128 127 }
129 128
130 - if ( function_exists( 'wc_get_page_id' ) && intval( wc_get_page_id( 'shop' ) ) === $post->ID ) {
131 - return false;
132 - }
133 -
134 129 return true;
135 130 }
136 131
137 132 /**
@@ -266,10 +261,8 @@
266 261 if ( ! $notice_id ) {
267 262 wp_die();
268 263 }
269 264
270 - check_admin_referer( 'elementor_set_admin_notice_viewed' );
271 -
272 265 self::set_user_notice( $notice_id );
273 266
274 267 if ( ! wp_doing_ajax() ) {
275 268 wp_safe_redirect( admin_url() );
@@ -279,11 +272,11 @@
279 272 wp_die();
280 273 }
281 274
282 275 /**
283 - * @param string $notice_id
284 - * @param bool $is_viewed
285 - * @param array $meta
276 + * @param $notice_id
277 + * @param $is_viewed
278 + * @param $meta
286 279 *
287 280 * @return void
288 281 */
289 282 public static function set_user_notice( $notice_id, $is_viewed = true, $meta = null ) {
@@ -314,13 +307,13 @@
314 307 update_user_meta( get_current_user_id(), self::INTRODUCTION_KEY, $user_introduction_meta );
315 308 }
316 309
317 310 /**
318 - * @throws \Exception If the user cannot install plugins.
311 + * @throws \Exception
319 312 */
320 313 public static function register_as_beta_tester( array $data ) {
321 314 if ( ! current_user_can( 'install_plugins' ) ) {
322 - throw new \Exception( 'You do not have permission to install plugins.' );
315 + throw new \Exception( __( 'You do not have permission to install plugins.', 'elementor' ) );
323 316 }
324 317
325 318 update_user_meta( get_current_user_id(), self::BETA_TESTER_META_KEY, true );
326 319 $response = wp_safe_remote_post(
@@ -366,20 +359,20 @@
366 359 return $user_introduction_meta;
367 360 }
368 361
369 362 /**
370 - * Get a user option with a fallback value.
363 + * Get a user option with default value as fallback.
371 364 *
372 - * @param string $option Option key.
373 - * @param int $user_id User ID.
374 - * @param mixed $fallback Default fallback value.
365 + * @param string $option - Option key.
366 + * @param int $user_id - User ID
367 + * @param mixed $default - Default fallback value.
375 368 *
376 369 * @return mixed
377 370 */
378 - public static function get_user_option_with_default( $option, $user_id, $fallback ) {
371 + public static function get_user_option_with_default( $option, $user_id, $default ) {
379 372 $value = get_user_option( $option, $user_id );
380 373
381 - return ( false === $value ) ? $fallback : $value;
374 + return ( false === $value ) ? $default : $value;
382 375 }
383 376
384 377 /**
385 378 * Get dismissed editor notices.