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
Copy file name to clipboardExpand all lines: plugins/performance-lab/includes/admin/plugins.php
+26-8Lines changed: 26 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -71,16 +71,34 @@ function perflab_query_plugin_info( string $plugin_slug ) {
71
71
returnnewWP_Error( 'no_plugins', __( 'No plugins found in the API response.', 'performance-lab' ) );
72
72
}
73
73
74
-
$plugins = array();
75
-
$standalone_plugins = array_merge(
76
-
array_flip( perflab_get_standalone_plugins() ),
77
-
array( 'optimization-detective' => array() ) // TODO: Programmatically discover the plugin dependencies and add them here. See <https://github.com/WordPress/performance/issues/1616>.
78
-
);
79
-
foreach ( $response->pluginsas$plugin_data ) {
80
-
if ( ! isset( $standalone_plugins[ $plugin_data['slug'] ] ) ) {
74
+
$plugins = array();
75
+
$plugin_queue = perflab_get_standalone_plugins();
76
+
77
+
// Index the plugins from the API response by their slug for efficient lookup.
0 commit comments