X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/48ab98cb1779cf2088c1351ac3dd3d0da6fb31d3..c81aba3d563f7459dc79140e4c5be67bcf506b92:/wp-admin/update.php diff --git a/wp-admin/update.php b/wp-admin/update.php index c2794443..fba26f88 100644 --- a/wp-admin/update.php +++ b/wp-admin/update.php @@ -97,11 +97,28 @@ if ( isset($_GET['action']) ) { 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'; @@ -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.' ) ); - 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. @@ -261,7 +278,7 @@ if ( isset($_GET['action']) ) { /** * Fires when a custom plugin or theme update request is received. * - * The dynamic portion of the hook name, $action, refers to the action + * The dynamic portion of the hook name, `$action`, refers to the action * provided in the request for wp-admin/update.php. Can be used to * provide custom update functionality for themes and plugins. *