PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 2.4.0
ShopBuilder – WooCommerce Builder For Elementor v2.4.0
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 +8 -24 3.4.22.4.0 View file →
@@ -9,9 +9,8 @@
9 9
10 10 namespace RadiusTheme\SB\Controllers;
11 11
12 12 use RadiusTheme\SB\Helpers\Cache;
13 -use RadiusTheme\SB\Helpers\Fns;
14 13 use RadiusTheme\SB\Traits\SingletonTrait;
15 14
16 15 // Do not allow directly accessing this file.
17 16 if ( ! defined( 'ABSPATH' ) ) {
@@ -57,38 +56,26 @@
57 56 $wp_admin_bar->add_node(
58 57 [
59 58 'id' => 'clear_all_cache',
60 59 'parent' => 'shop_builder', // Set the parent to the top-level item ID.
61 - 'title' => esc_html__( 'Purge All Cache', 'shopbuilder' ),
62 - 'href' => wp_nonce_url( add_query_arg( 'rtsb_clear_cache', 'all', add_query_arg( [] ) ), rtsb()->nonceText ),
60 + 'title' => 'Clear All Cache',
61 + 'href' => wp_nonce_url( add_query_arg( 'rtsb_clear_cache', 'all', add_query_arg( null, null ) ), rtsb()->nonceText ),
63 62 ]
64 63 );
65 -
66 - if ( Fns::is_optimization_enabled() ) {
67 - $wp_admin_bar->add_node(
68 - [
69 - 'id' => 'clear_asset_cache',
70 - 'parent' => 'shop_builder',
71 - 'title' => esc_html__( 'Purge Asset Cache', 'shopbuilder' ),
72 - 'href' => wp_nonce_url( add_query_arg( 'rtsb_clear_cache', 'asset', add_query_arg( [] ) ), rtsb()->nonceText ),
73 - ]
74 - );
75 - }
76 -
77 64 $wp_admin_bar->add_node(
78 65 [
79 66 'id' => 'clear_object_cache',
80 - 'parent' => 'shop_builder',
81 - 'title' => esc_html__( 'Purge Object Cache', 'shopbuilder' ),
82 - 'href' => wp_nonce_url( add_query_arg( 'rtsb_clear_cache', 'data', add_query_arg( [] ) ), rtsb()->nonceText ),
67 + 'parent' => 'shop_builder', // Set the parent to the top-level item ID.
68 + 'title' => 'Clear Object Cache',
69 + 'href' => wp_nonce_url( add_query_arg( 'rtsb_clear_cache', 'data', add_query_arg( null, null ) ), rtsb()->nonceText ),
83 70 ]
84 71 );
85 72 $wp_admin_bar->add_node(
86 73 [
87 74 'id' => 'clear_template_cache',
88 - 'parent' => 'shop_builder',
89 - 'title' => esc_html__( 'Purge Template Cache', 'shopbuilder' ),
90 - 'href' => wp_nonce_url( add_query_arg( 'rtsb_clear_cache', 'template', add_query_arg( [] ) ), rtsb()->nonceText ),
75 + 'parent' => 'shop_builder', // Set the parent to the top-level item ID.
76 + 'title' => 'Clear Template Cache',
77 + 'href' => wp_nonce_url( add_query_arg( 'rtsb_clear_cache', 'template', add_query_arg( null, null ) ), rtsb()->nonceText ),
91 78 ]
92 79 );
93 80 }
94 81
@@ -118,11 +105,8 @@
118 105 Cache::clear_data_cache();
119 106 break;
120 107 case 'template':
121 108 Cache::clear_template_cache();
122 - break;
123 - case 'asset':
124 - Cache::clear_asset_cache();
125 109 break;
126 110 }
127 111 // Set the notice flag.
128 112 set_transient( 'rtsb_cache_cleared_notice', true, 30 );