You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnnewWP_Error( 'standalone_plugin_activated', __( 'The module cannot be managed with Performance Lab since it is already active as a standalone plugin.', 'performance-lab' ) );
240
+
// Do not load the module if it can be loaded by a separate plugin.
241
+
if ( perflab_is_module_standalone( $module ) ) {
242
+
returnfalse;
246
243
}
247
244
248
245
// Require the file to get the closure for whether the module can load.
@@ -257,6 +254,26 @@ function perflab_can_load_module( $module ) {
257
254
return (bool) $module();
258
255
}
259
256
257
+
/**
258
+
* Checks whether the given module can be loaded by a separate plugin.
259
+
*
260
+
* @since n.e.x.t
261
+
*
262
+
* @param string $module Slug of the module.
263
+
* @return bool Whether the module can be loaded by a separate plugin or not.
0 commit comments