PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.2.1
ShopBuilder – WooCommerce Builder For Elementor v2.2.1
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/CacheController.php +9 -14 2.2.22.2.1 View file →
@@ -78,10 +78,9 @@
78 78 ]
79 79 );
80 80 }
81 81
82 -
83 - /**
82 + /***
84 83 *
85 84 * @return mixed
86 85 */
87 86 public function admin_bar_menu_action() {
@@ -90,14 +89,12 @@
90 89 }
91 90 if ( ! current_user_can( 'manage_options' ) ) {
92 91 return;
93 92 }
94 -
95 93 $clear_cache = sanitize_text_field( wp_unslash( $_GET['rtsb_clear_cache'] ?? '' ) );
96 94 if ( empty( $clear_cache ) ) {
97 95 return;
98 96 }
99 -
100 97 switch ( $clear_cache ) {
101 98 case 'all':
102 99 Cache::clear_all_cache();
103 100 break;
@@ -109,18 +106,16 @@
109 106 break;
110 107 }
111 108 // Set the notice flag.
112 109 set_transient( 'rtsb_cache_cleared_notice', true, 30 );
113 - $referrer = wp_get_referer(); // Get the referrer URL.
114 - if ( $referrer ) {
115 - // Rebuild the URL with the original path and query string.
116 - $redirect_url = $referrer;
117 - // Redirect to the referrer URL with its query string intact.
118 - wp_safe_redirect( $redirect_url );
119 - exit;
120 - }
121 - // Fallback: if referrer is not available, redirect to home_url().
122 - wp_safe_redirect( home_url() );
110 +
111 + $ref_pram = wp_parse_url( wp_get_referer() );
112 + $path = $ref_pram['path'] ?? '/';
113 + parse_str( ( $ref_pram['query'] ?? '' ), $query_array );
114 + $the_query_arg = add_query_arg( $query_array, home_url( $path ) );
115 + $params[] = '_wpnonce';
116 + $redirect_url = urldecode( remove_query_arg( $params, $the_query_arg ) );
117 + wp_safe_redirect( $redirect_url );
123 118 exit;
124 119 }
125 120
126 121 /**