Changeset 11013 for trunk/wp-admin/update.php
- Timestamp:
- 04/20/2009 06:18:39 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/update.php
r11012 r11013 35 35 36 36 include('admin-footer.php'); 37 37 38 38 } elseif ('activate-plugin' == $action ) { 39 39 if ( ! current_user_can('update_plugins') ) … … 64 64 65 65 include_once ABSPATH . 'wp-admin/includes/plugin-install.php'; //for plugins_api.. 66 66 67 67 check_admin_referer('install-plugin_' . $plugin); 68 68 $api = plugins_api('plugin_information', array('slug' => $plugin, 'fields' => array('sections' => false) ) ); //Save on a bit of bandwidth. 69 69 70 70 if ( is_wp_error($api) ) 71 71 wp_die($api); 72 72 73 73 $title = __('Plugin Install'); 74 74 $parent_file = 'plugins.php'; 75 75 $submenu_file = 'plugin-install.php'; 76 76 require_once('admin-header.php'); 77 77 78 78 $title = sprintf( __('Installing Plugin: %s'), $api->name . ' ' . $api->version ); 79 79 $nonce = 'install-plugin_' . $plugin; … … 83 83 $upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact('title', 'url', 'nonce', 'plugin', 'api') ) ); 84 84 $upgrader->install($api->download_link); 85 85 86 86 include('admin-footer.php'); 87 87 … … 99 99 $submenu_file = 'plugin-install.php'; 100 100 require_once('admin-header.php'); 101 101 102 102 $title = sprintf( __('Installing Plugin from uploaded file: %s'), basename( $file_upload->filename ) ); 103 103 $nonce = 'plugin-upload'; … … 131 131 132 132 include('admin-footer.php'); 133 133 134 134 } elseif ( 'install-theme' == $action ) { 135 135 … … 138 138 139 139 include_once ABSPATH . 'wp-admin/includes/theme-install.php'; //for themes_api.. 140 140 141 141 check_admin_referer('install-theme_' . $theme); 142 142 $api = themes_api('theme_information', array('slug' => $theme, 'fields' => array('sections' => false) ) ); //Save on a bit of bandwidth. … … 151 151 $submenu_file = 'theme-install.php'; 152 152 require_once('admin-header.php'); 153 153 154 154 $title = sprintf( __('Installing theme: %s'), $api->name . ' ' . $api->version ); 155 155 $nonce = 'install-theme_' . $theme; 156 156 $url = 'update.php?action=install-theme&theme=' . $theme; 157 157 $type = 'web'; //Install theme type, From Web or an Upload. 158 158 159 159 $upgrader = new Theme_Upgrader( new Theme_Installer_Skin( compact('title', 'url', 'nonce', 'plugin', 'api') ) ); 160 160 $upgrader->install($api->download_link); 161 161 162 162 include('admin-footer.php'); 163 163 164 164 } elseif ( 'upload-theme' == $action ) { 165 165
Note: See TracChangeset
for help on using the changeset viewer.