PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 3.2.6
ShopBuilder – WooCommerce Builder For Elementor v3.2.6
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 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.0 2.2.1 2.2.2 All 63 releases
← All changes | app/Controllers/Admin/Notice/Review.php +6 -20 2.1.23.2.6 View file →
@@ -24,10 +24,8 @@
24 24 */
25 25 private function __construct() {
26 26 add_action( 'admin_init', [ $this, 'check_installation_time' ], 10 );
27 27 add_action( 'admin_init', [ $this, 'notice_actions' ], 5 );
28 -
29 - $this->remove_all_notices();
30 28 }
31 29
32 30 /**
33 31 * Check if review notice should be shown or not
@@ -34,8 +32,9 @@
34 32 *
35 33 * @return void
36 34 */
37 35 public function check_installation_time() {
36 +
38 37 $nobug = get_option( 'rtsb_admin_review_spare_me' );
39 38 $rated = get_option( 'rtsb_admin_review_rated' );
40 39
41 40 if ( '1' == $nobug || 'yes' == $rated ) {
@@ -66,8 +65,9 @@
66 65 *
67 66 * @return void
68 67 */
69 68 public function notice_actions() {
69 + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.ValidatedSanitizedInput.MissingUnslash
70 70 if ( ! isset( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'rtsb_notice_nonce' ) ) {
71 71 return;
72 72 }
73 73
@@ -126,8 +126,11 @@
126 126 /**
127 127 * Display Admin Notice, asking for a review
128 128 **/
129 129 public function display_admin_notice() {
130 + if ( isset( $GLOBALS['woobundle_notice'] ) || isset( $GLOBALS['rtsb__notice'] ) ) {
131 + return;
132 + }
130 133 global $pagenow;
131 134
132 135 $exclude = [
133 136 'themes.php',
@@ -152,9 +155,9 @@
152 155 $args = [ '_wpnonce' => wp_create_nonce( 'rtsb_notice_nonce' ) ];
153 156 $dont_disturb = add_query_arg( $args + [ 'rtsb_admin_review_spare_me' => '1' ], $this->rtsb_current_admin_url() );
154 157 $remind_me = add_query_arg( $args + [ 'rtsb_admin_review_remind_me' => '1' ], $this->rtsb_current_admin_url() );
155 158 $rated = add_query_arg( $args + [ 'rtsb_admin_review_rated' => '1' ], $this->rtsb_current_admin_url() );
156 - $reviewurl = 'https://wordpress.org/support/plugin/shopbuilder/reviews/?filter=5#new-post';
159 + $reviewurl = 'https://wordpress.org/support/plugin/shopbuilder/reviews/';
157 160 $plugin_name = 'ShopBuilder – Elementor WooCommerce Builder Addons';
158 161 ?>
159 162 <div class="notice rtsb-review-notice rtsb-review-notice--extended">
160 163 <div class="rtsb-review-notice_content">
@@ -296,23 +299,6 @@
296 299 }
297 300 </style>
298 301 <?php
299 302 }
300 - }
301 -
302 - /**
303 - * Remove admin notices
304 - */
305 - public function remove_all_notices() {
306 - add_action(
307 - 'in_admin_header',
308 - function () {
309 - $screen = get_current_screen();
310 - if ( in_array( $screen->base, [ 'shopbuilder_page_rtsb-get-help' ], true ) ) {
311 - remove_all_actions( 'admin_notices' );
312 - remove_all_actions( 'all_admin_notices' );
313 - }
314 - },
315 - 1000
316 - );
317 303 }
318 304 }