]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/update.php
WordPress 4.4
[autoinstalls/wordpress.git] / wp-admin / update.php
index 6ded7a7d7a7c39a49d6311d89f49917ffe9a629d..fba26f885a32644b88bface862ba5ae5b2dd3d91 100644 (file)
@@ -97,11 +97,28 @@ if ( isset($_GET['action']) ) {
 
                include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); //for plugins_api..
 
 
                include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); //for plugins_api..
 
-               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 );
+               }
 
                $title = __('Plugin Install');
                $parent_file = 'plugins.php';
 
                $title = __('Plugin Install');
                $parent_file = 'plugins.php';
@@ -201,7 +218,7 @@ if ( isset($_GET['action']) ) {
                if ( ! current_user_can('install_themes') )
                        wp_die( __( 'You do not have sufficient permissions to install themes on this site.' ) );
 
                if ( ! current_user_can('install_themes') )
                        wp_die( __( 'You do not have sufficient permissions to install themes on this site.' ) );
 
-               include_once( ABSPATH . 'wp-admin/includes/theme-install.php' ); //for themes_api..
+               include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); //for themes_api..
 
                check_admin_referer( 'install-theme_' . $theme );
                $api = themes_api('theme_information', array('slug' => $theme, 'fields' => array('sections' => false, 'tags' => false) ) ); //Save on a bit of bandwidth.
 
                check_admin_referer( 'install-theme_' . $theme );
                $api = themes_api('theme_information', array('slug' => $theme, 'fields' => array('sections' => false, 'tags' => false) ) ); //Save on a bit of bandwidth.