WordPress.org

Make WordPress Core

Ticket #10046: goto.patch

File goto.patch, 3.8 KB (added by Simek, 5 years ago)
  • class-wp-upgrader.php

     
    5252 
    5353                $this->strings['download_failed'] = __('Download failed.'); 
    5454                $this->strings['installing_package'] = __('Installing the latest version.'); 
    55                 $this->strings['folder_exists'] = __('Destination folder already exists.'); 
     55                $this->strings['folder_exists'] = __('Destination folder already exists:'); 
    5656                $this->strings['mkdir_failed'] = __('Could not create directory.'); 
    5757                $this->strings['bad_package'] = __('Incompatible Archive'); 
    5858 
     
    205205                //If we're not clearing the destination folder, and something exists there allready, Bail. 
    206206                if ( ! $clear_destination && $wp_filesystem->exists($remote_destination) ) { 
    207207                        $wp_filesystem->delete($remote_source, true); //Clear out the source files. 
    208                         return new WP_Error('folder_exists', $this->strings['folder_exists'], $remote_destination ); 
     208                        return new WP_Error('folder_exists', $this->strings['folder_exists'], '<span class="code">'.$remote_destination.'</span>.'); 
    209209                } else if ( $clear_destination ) { 
    210210                        //We're going to clear the destination if theres something there 
    211211                        $this->skin->feedback('remove_old'); 
     
    825825                        show_message(__('Attempting reactivation of the plugin')); 
    826826                        echo '<iframe style="border:0;overflow:hidden" width="100%" height="170px" src="' . wp_nonce_url('update.php?action=activate-plugin&plugin=' . $this->plugin, 'activate-plugin_' . $this->plugin) .'"></iframe>'; 
    827827                } 
    828                 $update_actions =  array( 
     828                $update_actions = array( 
    829829                        '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>', 
    830                         'plugins_page' => '<a href="' . admin_url('plugins.php') . '" title="' . esc_attr__('Goto plugins page') . '" target="_parent">' . __('Return to Plugins page') . '</a>' 
     830                        'plugin_installer' => '<a href="' . admin_url('plugin-install.php') . '" title="' . esc_attr__('Go to Plugin Installer') . '" target="_parent">' . __('Go to Plugin Installer') . '</a>', 
     831                        'plugins_page' => '<a href="' . admin_url('plugins.php') . '" title="' . esc_attr__('Return to plugins page') . '" target="_parent">' . __('Return to Plugins page') . '</a>' 
    831832                ); 
    832833                if ( $this->plugin_active ) 
    833834                        unset( $update_actions['activate_plugin'] ); 
     
    881882                                                        ); 
    882883 
    883884                if ( $this->type == 'web' ) 
    884                         $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>'; 
     885                        $install_actions['plugins_page'] = ' 
     886                                <a href="' . admin_url('plugins.php') . '" title="' . esc_attr__('Go to Plugins page') . '" target="_parent">' . __('Go to Plugins page') . '</a> | 
     887                                <a href="' . admin_url('plugin-install.php') . '" title="' . esc_attr__('Return to Plugin Installer') . '" target="_parent">' . __('Return to Plugin Installer') . '</a> 
     888                        '; 
    885889                else 
    886                         $install_actions['plugins_page'] = '<a href="' . admin_url('plugins.php') . '" title="' . esc_attr__('Return to Plugins page') . '" target="_parent">' . __('Return to Plugins page') . '</a>'; 
     890                        $install_actions['plugins_page'] = ' 
     891                                <a href="' . admin_url('plugin-install.php') . '" title="' . esc_attr__('Go to Plugin Installer') . '" target="_parent">' . __('Go to Plugin Installer') . '</a> | 
     892                                <a href="' . admin_url('plugins.php') . '" title="' . esc_attr__('Return to Plugins page') . '" target="_parent">' . __('Return to Plugins page') . '</a> 
     893                        '; 
    887894 
    888  
    889895                if ( ! $this->result || is_wp_error($this->result) ) 
    890896                        unset( $install_actions['activate_plugin'] ); 
    891897