Changes from trunk/wp-admin/includes/class-wp-upgrader.php at r17102 to branches/3.0/wp-admin/includes/class-wp-upgrader.php at r15288
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/wp-admin/includes/class-wp-upgrader.php
r17102 r15288 369 369 function upgrade_strings() { 370 370 $this->strings['up_to_date'] = __('The plugin is at the latest version.'); 371 $this->strings['no_package'] = __('Up date package not available.');371 $this->strings['no_package'] = __('Upgrade package not available.'); 372 372 $this->strings['downloading_package'] = __('Downloading update from <span class="code">%s</span>…'); 373 373 $this->strings['unpack_package'] = __('Unpacking the update…'); … … 375 375 $this->strings['remove_old'] = __('Removing the old version of the plugin…'); 376 376 $this->strings['remove_old_failed'] = __('Could not remove the old plugin.'); 377 $this->strings['process_failed'] = __('Plugin up date failed.');378 $this->strings['process_success'] = __('Plugin up dated successfully.');377 $this->strings['process_failed'] = __('Plugin upgrade failed.'); 378 $this->strings['process_success'] = __('Plugin upgraded successfully.'); 379 379 } 380 380 … … 469 469 $this->skin->bulk_header(); 470 470 471 // Only start maintenance mode if running in Multisite OR the plugin is in use 472 $maintenance = is_multisite(); // @TODO: This should only kick in for individual sites if at all possible. 473 foreach ( $plugins as $plugin ) 474 $maintenance = $maintenance || (is_plugin_active($plugin) && isset($current->response[ $plugin ]) ); // Only activate Maintenance mode if a plugin is active AND has an update available 475 if ( $maintenance ) 476 $this->maintenance_mode(true); 471 $this->maintenance_mode(true); 477 472 478 473 $results = array(); … … 609 604 function upgrade_strings() { 610 605 $this->strings['up_to_date'] = __('The theme is at the latest version.'); 611 $this->strings['no_package'] = __('Up date package not available.');606 $this->strings['no_package'] = __('Upgrade package not available.'); 612 607 $this->strings['downloading_package'] = __('Downloading update from <span class="code">%s</span>…'); 613 608 $this->strings['unpack_package'] = __('Unpacking the update…'); 614 609 $this->strings['remove_old'] = __('Removing the old version of the theme…'); 615 610 $this->strings['remove_old_failed'] = __('Could not remove the old theme.'); 616 $this->strings['process_failed'] = __('Theme up date failed.');617 $this->strings['process_success'] = __('Theme up dated successfully.');611 $this->strings['process_failed'] = __('Theme upgrade failed.'); 612 $this->strings['process_success'] = __('Theme upgraded successfully.'); 618 613 } 619 614 … … 718 713 $this->skin->bulk_header(); 719 714 720 // Only start maintenance mode if running in Multisite OR the theme is in use 721 $maintenance = is_multisite(); // @TODO: This should only kick in for individual sites if at all possible. 722 foreach ( $themes as $theme ) 723 $maintenance = $maintenance || $theme == get_stylesheet() || $theme == get_template(); 724 if ( $maintenance ) 725 $this->maintenance_mode(true); 715 $this->maintenance_mode(true); 726 716 727 717 $results = array(); … … 791 781 if ( $theme != get_stylesheet() ) //If not current 792 782 return $return; 793 //Change to maint enance mode now.783 //Change to maintainence mode now. 794 784 if ( ! $this->bulk ) 795 785 $this->maintenance_mode(true); … … 807 797 808 798 //Ensure stylesheet name hasnt changed after the upgrade: 809 // @TODO: Note, This doesnt handle the Template changing, or the Template name changing.810 799 if ( $theme == get_stylesheet() && $theme != $this->result['destination_name'] ) { 811 800 $theme_info = $this->theme_info(); … … 815 804 } 816 805 817 //Time to remove maint enance mode806 //Time to remove maintainence mode 818 807 if ( ! $this->bulk ) 819 808 $this->maintenance_mode(false); … … 862 851 function upgrade_strings() { 863 852 $this->strings['up_to_date'] = __('WordPress is at the latest version.'); 864 $this->strings['no_package'] = __('Up date package not available.');853 $this->strings['no_package'] = __('Upgrade package not available.'); 865 854 $this->strings['downloading_package'] = __('Downloading update from <span class="code">%s</span>…'); 866 855 $this->strings['unpack_package'] = __('Unpacking the update…'); … … 1018 1007 1019 1008 function __construct($args = array()) { 1020 $defaults = array( 'url' => '', 'plugin' => '', 'nonce' => '', 'title' => __('Up date Plugin') );1009 $defaults = array( 'url' => '', 'plugin' => '', 'nonce' => '', 'title' => __('Upgrade Plugin') ); 1021 1010 $args = wp_parse_args($args, $defaults); 1022 1011 … … 1038 1027 $update_actions = array( 1039 1028 'activate_plugin' => '<a href="' . wp_nonce_url('plugins.php?action=activate&plugin=' . $this->plugin, 'activate-plugin_' . $this->plugin) . '" title="' . esc_attr__('Activate this plugin') . '" target="_parent">' . __('Activate Plugin') . '</a>', 1040 'plugins_page' => '<a href="' . self_admin_url('plugins.php') . '" title="' . esc_attr__('Goto plugins page') . '" target="_parent">' . __('Return to Plugins page') . '</a>'1029 'plugins_page' => '<a href="' . admin_url('plugins.php') . '" title="' . esc_attr__('Goto plugins page') . '" target="_parent">' . __('Return to Plugins page') . '</a>' 1041 1030 ); 1042 1031 if ( $this->plugin_active ) … … 1047 1036 $update_actions = apply_filters('update_plugin_complete_actions', $update_actions, $this->plugin); 1048 1037 if ( ! empty($update_actions) ) 1049 $this->feedback( implode(' | ', (array)$update_actions));1038 $this->feedback('<strong>' . __('Actions:') . '</strong> ' . implode(' | ', (array)$update_actions)); 1050 1039 } 1051 1040 … … 1081 1070 1082 1071 function add_strings() { 1083 $this->upgrader->strings['skin_upgrade_start'] = __('The update process is starting. This process may take a while on some hosts, so please be patient.');1084 $this->upgrader->strings['skin_update_failed_error'] = __('An error occur red while updating %1$s: <strong>%2$s</strong>.');1072 $this->upgrader->strings['skin_upgrade_start'] = __('The update process is starting. This process may take awhile on some hosts, so please be patient.'); 1073 $this->upgrader->strings['skin_update_failed_error'] = __('An error occured while updating %1$s: <strong>%2$s</strong>.'); 1085 1074 $this->upgrader->strings['skin_update_failed'] = __('The update of %1$s failed.'); 1086 1075 $this->upgrader->strings['skin_update_successful'] = __('%1$s updated successfully.').' <a onclick="%2$s" href="#" class="hide-if-no-js"><span>'.__('Show Details').'</span><span class="hidden">'.__('Hide Details').'</span>.</a>'; … … 1196 1185 parent::bulk_footer(); 1197 1186 $update_actions = array( 1198 'plugins_page' => '<a href="' . self_admin_url('plugins.php') . '" title="' . esc_attr__('Goto plugins page') . '" target="_parent">' . __('Return to Plugins page') . '</a>',1199 'updates_page' => '<a href="' . self_admin_url('update-core.php') . '" title="' . esc_attr__('Goto WordPress Updates page') . '" target="_parent">' . __('Return to WordPress Updates') . '</a>'1187 'plugins_page' => '<a href="' . admin_url('plugins.php') . '" title="' . esc_attr__('Goto plugins page') . '" target="_parent">' . __('Return to Plugins page') . '</a>', 1188 'updates_page' => '<a href="' . admin_url('update-core.php') . '" title="' . esc_attr__('Goto WordPress Updates page') . '" target="_parent">' . __('Return to WordPress Updates') . '</a>' 1200 1189 ); 1201 1190 1202 1191 $update_actions = apply_filters('update_bulk_plugins_complete_actions', $update_actions, $this->plugin_info); 1203 1192 if ( ! empty($update_actions) ) 1204 $this->feedback( implode(' | ', (array)$update_actions));1193 $this->feedback('<strong>' . __('Actions:') . '</strong> ' . implode(' | ', (array)$update_actions)); 1205 1194 } 1206 1195 } … … 1227 1216 parent::bulk_footer(); 1228 1217 $update_actions = array( 1229 'themes_page' => '<a href="' . self_admin_url('themes.php') . '" title="' . esc_attr__('Goto themes page') . '" target="_parent">' . __('Return to Themes page') . '</a>',1230 'updates_page' => '<a href="' . self_admin_url('update-core.php') . '" title="' . esc_attr__('Goto WordPress Updates page') . '" target="_parent">' . __('Return to WordPress Updates') . '</a>'1218 'themes_page' => '<a href="' . admin_url('themes.php') . '" title="' . esc_attr__('Goto themes page') . '" target="_parent">' . __('Return to Themes page') . '</a>', 1219 'updates_page' => '<a href="' . admin_url('update-core.php') . '" title="' . esc_attr__('Goto WordPress Updates page') . '" target="_parent">' . __('Return to WordPress Updates') . '</a>' 1231 1220 ); 1232 1221 1233 1222 $update_actions = apply_filters('update_bulk_theme_complete_actions', $update_actions, $this->theme_info); 1234 1223 if ( ! empty($update_actions) ) 1235 $this->feedback( implode(' | ', (array)$update_actions));1224 $this->feedback('<strong>' . __('Actions:') . '</strong> ' . implode(' | ', (array)$update_actions)); 1236 1225 } 1237 1226 } … … 1282 1271 $install_actions['activate_plugin'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&plugin=' . $plugin_file, 'activate-plugin_' . $plugin_file) . '" title="' . esc_attr__('Activate this plugin') . '" target="_parent">' . __('Activate Plugin') . '</a>'; 1283 1272 1284 if ( is_multisite() && current_user_can( 'manage_network_plugins' ) ) { 1285 $install_actions['network_activate'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&networkwide=1&plugin=' . $plugin_file, 'activate-plugin_' . $plugin_file) . '" title="' . esc_attr__('Activate this plugin for all sites in this network') . '" target="_parent">' . __('Network Activate') . '</a>'; 1286 unset( $install_actions['activate_plugin'] ); 1287 } 1273 if ( is_multisite() && current_user_can( 'manage_network_plugins' ) ) 1274 $install_actions['network_activate'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&networkwide=1&plugin=' . $plugin_file, 'activate-plugin_' . $plugin_file) . '" title="' . __('Activate this plugin for all sites in this network') . '" target="_parent">' . __('Network Activate') . '</a>'; 1288 1275 1289 1276 if ( 'import' == $from ) 1290 1277 $install_actions['importers_page'] = '<a href="' . admin_url('import.php') . '" title="' . esc_attr__('Return to Importers') . '" target="_parent">' . __('Return to Importers') . '</a>'; 1291 1278 else if ( $this->type == 'web' ) 1292 $install_actions['plugins_page'] = '<a href="' . self_admin_url('plugin-install.php') . '" title="' . esc_attr__('Return to Plugin Installer') . '" target="_parent">' . __('Return to Plugin Installer') . '</a>';1279 $install_actions['plugins_page'] = '<a href="' . admin_url('plugin-install.php') . '" title="' . esc_attr__('Return to Plugin Installer') . '" target="_parent">' . __('Return to Plugin Installer') . '</a>'; 1293 1280 else 1294 $install_actions['plugins_page'] = '<a href="' . self_admin_url('plugins.php') . '" title="' . esc_attr__('Return to Plugins page') . '" target="_parent">' . __('Return to Plugins page') . '</a>';1281 $install_actions['plugins_page'] = '<a href="' . admin_url('plugins.php') . '" title="' . esc_attr__('Return to Plugins page') . '" target="_parent">' . __('Return to Plugins page') . '</a>'; 1295 1282 1296 1283 … … 1301 1288 $install_actions = apply_filters('install_plugin_complete_actions', $install_actions, $this->api, $plugin_file); 1302 1289 if ( ! empty($install_actions) ) 1303 $this->feedback( implode(' | ', (array)$install_actions));1290 $this->feedback('<strong>' . __('Actions:') . '</strong> ' . implode(' | ', (array)$install_actions)); 1304 1291 } 1305 1292 } … … 1359 1346 1360 1347 if ( $this->type == 'web' ) 1361 $install_actions['themes_page'] = '<a href="' . self_admin_url('theme-install.php') . '" title="' . esc_attr__('Return to Theme Installer') . '" target="_parent">' . __('Return to Theme Installer') . '</a>';1348 $install_actions['themes_page'] = '<a href="' . admin_url('theme-install.php') . '" title="' . esc_attr__('Return to Theme Installer') . '" target="_parent">' . __('Return to Theme Installer') . '</a>'; 1362 1349 else 1363 $install_actions['themes_page'] = '<a href="' . self_admin_url('themes.php') . '" title="' . esc_attr__('Themes page') . '" target="_parent">' . __('Return to Themes page') . '</a>';1364 1365 if ( ! $this->result || is_wp_error($this->result) || is_network_admin())1350 $install_actions['themes_page'] = '<a href="' . admin_url('themes.php') . '" title="' . esc_attr__('Themes page') . '" target="_parent">' . __('Return to Themes page') . '</a>'; 1351 1352 if ( ! $this->result || is_wp_error($this->result) ) 1366 1353 unset( $install_actions['activate'], $install_actions['preview'] ); 1367 1354 1368 1355 $install_actions = apply_filters('install_theme_complete_actions', $install_actions, $this->api, $stylesheet, $theme_info); 1369 1356 if ( ! empty($install_actions) ) 1370 $this->feedback( implode(' | ', (array)$install_actions));1357 $this->feedback('<strong>' . __('Actions:') . '</strong> ' . implode(' | ', (array)$install_actions)); 1371 1358 } 1372 1359 } … … 1389 1376 1390 1377 function __construct($args = array()) { 1391 $defaults = array( 'url' => '', 'theme' => '', 'nonce' => '', 'title' => __('Up date Theme') );1378 $defaults = array( 'url' => '', 'theme' => '', 'nonce' => '', 'title' => __('Upgrade Theme') ); 1392 1379 $args = wp_parse_args($args, $defaults); 1393 1380 … … 1418 1405 } 1419 1406 1420 $update_actions['themes_page'] = '<a href="' . self_admin_url('themes.php') . '" title="' . esc_attr__('Return to Themes page') . '" target="_parent">' . __('Return to Themes page') . '</a>';1407 $update_actions['themes_page'] = '<a href="' . admin_url('themes.php') . '" title="' . esc_attr__('Return to Themes page') . '" target="_parent">' . __('Return to Themes page') . '</a>'; 1421 1408 1422 1409 $update_actions = apply_filters('update_theme_complete_actions', $update_actions, $this->theme); 1423 1410 if ( ! empty($update_actions) ) 1424 $this->feedback( implode(' | ', (array)$update_actions));1411 $this->feedback('<strong>' . __('Actions:') . '</strong> ' . implode(' | ', (array)$update_actions)); 1425 1412 } 1426 1413 }
Note: See TracChangeset
for help on using the changeset viewer.