function wp_automatic_upgrade()
{
    if (!user_can_access_admin_page()) {
        return false;
    }
    if (isset($_REQUEST['_wpnonce'])) {
        if (function_exists('check_admin_referer')) {
            check_admin_referer('wordpress_automatic_upgrade');
        }
    }
    global $task;
    switch ($task) {
        case 'start':
            show_upgrade_start();
            break;
        case 'files':
            wpau_backup_files();
            break;
        case 'skipfiles':
            wpau_skip_backup_files();
            break;
        case 'backupdbopt':
            wpau_backup_db_options();
            break;
        case 'skipbackupdbopt':
            wpau_skip_backup_db();
            break;
        case 'backupdb':
            wpau_backup_db();
            break;
        case 'newversionoption':
            wpau_show_new_version_forms();
            break;
        case 'getlatestfiles':
            wpau_get_latest_version();
            break;
        case 'maintmode':
            wpau_site_down();
            break;
        case 'de-plugin':
            wpau_deactivate_plugins();
            break;
        case 'upgrade':
            wpau_upgrade_installation();
            break;
        case 'updatedb':
            wpau_update_database();
            break;
        case 're-plugin':
            wpau_reactivate_plugins();
            break;
        case 'cleanup':
            wpau_cleanup();
            break;
        case 'done':
            wpau_show_backup_log();
            break;
        case 'logs':
            wpau_show_log();
            break;
        case 'prelimopts':
            wpau_prelim_opts_and_sanatize();
            break;
        case 'skiptask':
            wpau_skip_task();
        default:
            wpau_run_prelims();
            break;
    }
}
예제 #2
0
 case 3:
     if (wpau_get_latest_version(true)) {
         echo "true";
     } else {
         echo "false";
     }
     break;
 case 4:
     if (wpau_deactivate_plugins(true)) {
         echo "true";
     } else {
         echo "false";
     }
     break;
 case 5:
     if (wpau_site_down(true)) {
         echo "true";
     } else {
         echo "false";
     }
     break;
 case 6:
     if (wpau_upgrade_installation(true)) {
         echo "true";
     } else {
         echo "false";
     }
     break;
 case 7:
     if (wpau_show_reactivate_plugins(true)) {
     }