Skip to content

Commit

Permalink
Improve performance
Browse files Browse the repository at this point in the history
  • Loading branch information
mukeshpanchal27 committed Oct 2, 2024
1 parent c97c33f commit dc9f0e3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugins/performance-lab/includes/admin/plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ function perflab_query_plugin_info( string $plugin_slug ) {
return new WP_Error( 'no_plugins', __( 'No plugins found in the API response.', 'performance-lab' ) );
}

$plugins = array();
$plugins = array();
$standalone_plugins = array_flip( perflab_get_standalone_plugins() );
foreach ( $response->plugins as $plugin_data ) {
if ( ! in_array( $plugin_data['slug'], perflab_get_standalone_plugins(), true ) ) {
if ( ! isset( $standalone_plugins[ $plugin_data['slug'] ] ) ) {
continue;
}
$plugins[ $plugin_data['slug'] ] = wp_array_slice_assoc( $plugin_data, $fields );
Expand Down

0 comments on commit dc9f0e3

Please sign in to comment.