- check_admin_referer('install-plugin_' . $plugin);
- $api = plugins_api('plugin_information', array('slug' => $plugin, 'fields' => array('sections' => false) ) ); //Save on a bit of bandwidth.
-
- if ( is_wp_error($api) )
- wp_die($api);
+ check_admin_referer( 'install-plugin_' . $plugin );
+ $api = plugins_api( 'plugin_information', array(
+ 'slug' => $plugin,
+ 'fields' => array(
+ 'short_description' => false,
+ 'sections' => false,
+ 'requires' => false,
+ 'rating' => false,
+ 'ratings' => false,
+ 'downloaded' => false,
+ 'last_updated' => false,
+ 'added' => false,
+ 'tags' => false,
+ 'compatibility' => false,
+ 'homepage' => false,
+ 'donate_link' => false,
+ ),
+ ) );
+
+ if ( is_wp_error( $api ) ) {
+ wp_die( $api );
+ }