File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -145,8 +145,9 @@ function perflab_get_standalone_plugin_version_constants(): array {
145
145
* the frontend.
146
146
*
147
147
* This function will short-circuit if at least one of the constants
148
- * 'PERFLAB_DISABLE_SERVER_TIMING' or 'PERFLAB_DISABLE_OBJECT_CACHE_DROPIN' is
149
- * set as true.
148
+ * 'PERFLAB_DISABLE_SERVER_TIMING' or
149
+ * 'PERFLAB_DISABLE_OBJECT_CACHE_DROPIN' is set as true or if the
150
+ * 'PERFLAB_PLACE_OBJECT_CACHE_DROPIN' constant is not set to a truthy value.
150
151
*
151
152
* @since 1.8.0
152
153
* @since 2.1.0 No longer attempts to use two of the drop-ins together.
@@ -156,6 +157,11 @@ function perflab_get_standalone_plugin_version_constants(): array {
156
157
function perflab_maybe_set_object_cache_dropin (): void {
157
158
global $ wp_filesystem ;
158
159
160
+ // Bail if the drop-in is not enabled.
161
+ if ( ! defined ( 'PERFLAB_PLACE_OBJECT_CACHE_DROPIN ' ) || ! PERFLAB_PLACE_OBJECT_CACHE_DROPIN ) {
162
+ return ;
163
+ }
164
+
159
165
// Bail if Server-Timing is disabled entirely.
160
166
if ( defined ( 'PERFLAB_DISABLE_SERVER_TIMING ' ) && PERFLAB_DISABLE_SERVER_TIMING ) {
161
167
return ;
You can’t perform that action at this time.
0 commit comments