PluginProbe
Powered Cache – Caching and Optimization for WordPress – Easily Improve PageSpeed & Web Vitals Score / 3.6.3
Powered Cache – Caching and Optimization for WordPress – Easily Improve PageSpeed & Web Vitals Score v3.6.3
trunk 1.0 1.0.1 1.1 1.1.1 1.1.2 1.2 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 2.0 2.0.1 2.0.2 2.0.3 2.0.4 2.1 2.1.1 2.1.2 2.2 2.2.1 All 69 releases
← All changes | includes/core.php +8 -2 2.13.6.3 View file →
@@ -7,8 +7,9 @@
7 7
8 8 namespace PoweredCache\Core;
9 9
10 10 use PoweredCache\Async\CachePreloader;
11 +use PoweredCache\Async\CachePurger;
11 12 use PoweredCache\Async\DatabaseOptimizer;
12 13 use PoweredCache\Config;
13 14 use const PoweredCache\Constants\DB_CLEANUP_COUNT_CACHE_KEY;
14 15 use const PoweredCache\Constants\MENU_SLUG;
@@ -127,9 +128,9 @@
127 128 if ( ! in_array( $context, get_enqueue_contexts(), true ) ) {
128 129 return new WP_Error( 'invalid_enqueue_context', 'Invalid $context specified in PoweredCache script loader.' );
129 130 }
130 131
131 - return POWERED_CACHE_URL . "dist/js/${script}.js";
132 + return POWERED_CACHE_URL . "dist/js/{$script}.js";
132 133
133 134 }
134 135
135 136 /**
@@ -145,9 +146,9 @@
145 146 if ( ! in_array( $context, get_enqueue_contexts(), true ) ) {
146 147 return new WP_Error( 'invalid_enqueue_context', 'Invalid $context specified in PoweredCache stylesheet loader.' );
147 148 }
148 149
149 - return POWERED_CACHE_URL . "dist/css/${stylesheet}.css";
150 + return POWERED_CACHE_URL . "dist/css/{$stylesheet}.css";
150 151
151 152 }
152 153
153 154 /**
@@ -203,8 +204,12 @@
203 204 * @since 2.0
204 205 */
205 206 function block_editor_assets() {
206 207
208 + if ( ! current_user_can( 'edit_others_posts' ) ) {
209 + return;
210 + }
211 +
207 212 /**
208 213 * Min. WP 5.3 required for block editor plugin due to useSelect
209 214 * Likely the older version of react didn't support hooks.
210 215 * The post meta-box works with compat mode vice-versa...
@@ -300,5 +305,6 @@
300 305 * Invoke async classes
301 306 */
302 307 function register_async_process() {
303 308 DatabaseOptimizer::factory();
309 + CachePurger::factory();
304 310 }