Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/wp-admin/includes/class-wp-upgrader.php

    r17102 r15288  
    369369    function upgrade_strings() {
    370370        $this->strings['up_to_date'] = __('The plugin is at the latest version.');
    371         $this->strings['no_package'] = __('Update package not available.');
     371        $this->strings['no_package'] = __('Upgrade package not available.');
    372372        $this->strings['downloading_package'] = __('Downloading update from <span class="code">%s</span>&#8230;');
    373373        $this->strings['unpack_package'] = __('Unpacking the update&#8230;');
     
    375375        $this->strings['remove_old'] = __('Removing the old version of the plugin&#8230;');
    376376        $this->strings['remove_old_failed'] = __('Could not remove the old plugin.');
    377         $this->strings['process_failed'] = __('Plugin update failed.');
    378         $this->strings['process_success'] = __('Plugin updated successfully.');
     377        $this->strings['process_failed'] = __('Plugin upgrade failed.');
     378        $this->strings['process_success'] = __('Plugin upgraded successfully.');
    379379    }
    380380
     
    469469        $this->skin->bulk_header();
    470470
    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);
    477472
    478473        $results = array();
     
    609604    function upgrade_strings() {
    610605        $this->strings['up_to_date'] = __('The theme is at the latest version.');
    611         $this->strings['no_package'] = __('Update package not available.');
     606        $this->strings['no_package'] = __('Upgrade package not available.');
    612607        $this->strings['downloading_package'] = __('Downloading update from <span class="code">%s</span>&#8230;');
    613608        $this->strings['unpack_package'] = __('Unpacking the update&#8230;');
    614609        $this->strings['remove_old'] = __('Removing the old version of the theme&#8230;');
    615610        $this->strings['remove_old_failed'] = __('Could not remove the old theme.');
    616         $this->strings['process_failed'] = __('Theme update failed.');
    617         $this->strings['process_success'] = __('Theme updated successfully.');
     611        $this->strings['process_failed'] = __('Theme upgrade failed.');
     612        $this->strings['process_success'] = __('Theme upgraded successfully.');
    618613    }
    619614
     
    718713        $this->skin->bulk_header();
    719714
    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);
    726716
    727717        $results = array();
     
    791781        if ( $theme != get_stylesheet() ) //If not current
    792782            return $return;
    793         //Change to maintenance mode now.
     783        //Change to maintainence mode now.
    794784        if ( ! $this->bulk )
    795785            $this->maintenance_mode(true);
     
    807797
    808798        //Ensure stylesheet name hasnt changed after the upgrade:
    809         // @TODO: Note, This doesnt handle the Template changing, or the Template name changing.
    810799        if ( $theme == get_stylesheet() && $theme != $this->result['destination_name'] ) {
    811800            $theme_info = $this->theme_info();
     
    815804        }
    816805
    817         //Time to remove maintenance mode
     806        //Time to remove maintainence mode
    818807        if ( ! $this->bulk )
    819808            $this->maintenance_mode(false);
     
    862851    function upgrade_strings() {
    863852        $this->strings['up_to_date'] = __('WordPress is at the latest version.');
    864         $this->strings['no_package'] = __('Update package not available.');
     853        $this->strings['no_package'] = __('Upgrade package not available.');
    865854        $this->strings['downloading_package'] = __('Downloading update from <span class="code">%s</span>&#8230;');
    866855        $this->strings['unpack_package'] = __('Unpacking the update&#8230;');
     
    10181007
    10191008    function __construct($args = array()) {
    1020         $defaults = array( 'url' => '', 'plugin' => '', 'nonce' => '', 'title' => __('Update Plugin') );
     1009        $defaults = array( 'url' => '', 'plugin' => '', 'nonce' => '', 'title' => __('Upgrade Plugin') );
    10211010        $args = wp_parse_args($args, $defaults);
    10221011
     
    10381027        $update_actions =  array(
    10391028            'activate_plugin' => '<a href="' . wp_nonce_url('plugins.php?action=activate&amp;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__('Go to 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>'
    10411030        );
    10421031        if ( $this->plugin_active )
     
    10471036        $update_actions = apply_filters('update_plugin_complete_actions', $update_actions, $this->plugin);
    10481037        if ( ! empty($update_actions) )
    1049             $this->feedback(implode(' | ', (array)$update_actions));
     1038            $this->feedback('<strong>' . __('Actions:') . '</strong> ' . implode(' | ', (array)$update_actions));
    10501039    }
    10511040
     
    10811070
    10821071    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 occurred 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>.');
    10851074        $this->upgrader->strings['skin_update_failed'] = __('The update of %1$s failed.');
    10861075        $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>';
     
    11961185        parent::bulk_footer();
    11971186        $update_actions =  array(
    1198             'plugins_page' => '<a href="' . self_admin_url('plugins.php') . '" title="' . esc_attr__('Go to plugins page') . '" target="_parent">' . __('Return to Plugins page') . '</a>',
    1199             'updates_page' => '<a href="' . self_admin_url('update-core.php') . '" title="' . esc_attr__('Go to 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>'
    12001189        );
    12011190
    12021191        $update_actions = apply_filters('update_bulk_plugins_complete_actions', $update_actions, $this->plugin_info);
    12031192        if ( ! empty($update_actions) )
    1204             $this->feedback(implode(' | ', (array)$update_actions));
     1193            $this->feedback('<strong>' . __('Actions:') . '</strong> ' . implode(' | ', (array)$update_actions));
    12051194    }
    12061195}
     
    12271216        parent::bulk_footer();
    12281217        $update_actions =  array(
    1229             'themes_page' => '<a href="' . self_admin_url('themes.php') . '" title="' . esc_attr__('Go to themes page') . '" target="_parent">' . __('Return to Themes page') . '</a>',
    1230             'updates_page' => '<a href="' . self_admin_url('update-core.php') . '" title="' . esc_attr__('Go to 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>'
    12311220        );
    12321221
    12331222        $update_actions = apply_filters('update_bulk_theme_complete_actions', $update_actions, $this->theme_info);
    12341223        if ( ! empty($update_actions) )
    1235             $this->feedback(implode(' | ', (array)$update_actions));
     1224            $this->feedback('<strong>' . __('Actions:') . '</strong> ' . implode(' | ', (array)$update_actions));
    12361225    }
    12371226}
     
    12821271            $install_actions['activate_plugin'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&amp;plugin=' . $plugin_file, 'activate-plugin_' . $plugin_file) . '" title="' . esc_attr__('Activate this plugin') . '" target="_parent">' . __('Activate Plugin') . '</a>';
    12831272
    1284         if ( is_multisite() && current_user_can( 'manage_network_plugins' ) ) {
    1285             $install_actions['network_activate'] = '<a href="' . wp_nonce_url('plugins.php?action=activate&amp;networkwide=1&amp;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&amp;networkwide=1&amp;plugin=' . $plugin_file, 'activate-plugin_' . $plugin_file) . '" title="' . __('Activate this plugin for all sites in this network') . '" target="_parent">' . __('Network Activate') . '</a>';
    12881275
    12891276        if ( 'import' == $from )
    12901277            $install_actions['importers_page'] = '<a href="' . admin_url('import.php') . '" title="' . esc_attr__('Return to Importers') . '" target="_parent">' . __('Return to Importers') . '</a>';
    12911278        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>';
    12931280        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>';
    12951282
    12961283
     
    13011288        $install_actions = apply_filters('install_plugin_complete_actions', $install_actions, $this->api, $plugin_file);
    13021289        if ( ! empty($install_actions) )
    1303             $this->feedback(implode(' | ', (array)$install_actions));
     1290            $this->feedback('<strong>' . __('Actions:') . '</strong> ' . implode(' | ', (array)$install_actions));
    13041291    }
    13051292}
     
    13591346
    13601347        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>';
    13621349        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) )
    13661353            unset( $install_actions['activate'], $install_actions['preview'] );
    13671354
    13681355        $install_actions = apply_filters('install_theme_complete_actions', $install_actions, $this->api, $stylesheet, $theme_info);
    13691356        if ( ! empty($install_actions) )
    1370             $this->feedback(implode(' | ', (array)$install_actions));
     1357            $this->feedback('<strong>' . __('Actions:') . '</strong> ' . implode(' | ', (array)$install_actions));
    13711358    }
    13721359}
     
    13891376
    13901377    function __construct($args = array()) {
    1391         $defaults = array( 'url' => '', 'theme' => '', 'nonce' => '', 'title' => __('Update Theme') );
     1378        $defaults = array( 'url' => '', 'theme' => '', 'nonce' => '', 'title' => __('Upgrade Theme') );
    13921379        $args = wp_parse_args($args, $defaults);
    13931380
     
    14181405        }
    14191406
    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>';
    14211408
    14221409        $update_actions = apply_filters('update_theme_complete_actions', $update_actions, $this->theme);
    14231410        if ( ! empty($update_actions) )
    1424             $this->feedback(implode(' | ', (array)$update_actions));
     1411            $this->feedback('<strong>' . __('Actions:') . '</strong> ' . implode(' | ', (array)$update_actions));
    14251412    }
    14261413}
Note: See TracChangeset for help on using the changeset viewer.