$_POST['_wpnonce'], '_wp_http_referer' => $_POST['_wp_http_referer'], 'upgrade' => 1, 'version' => $version, 'locale' => $locale ]; $backup_url = admin_url().'admin.php?page='.$plugin_dir.'/akeebabackupwp.php&view=backup&autostart=1&backuponupdate=1'; $backup_url .= '&profile='.$backup_profile; // Let's use already generated nonce, and tell AWF which action we used to generate it $backup_url .= '&_wpnonce='.$_POST['_wpnonce']; $backup_url .= '&_wpaction=upgrade-core'; $backup_url .= '&returnurl='.urlencode($return_url); $backup_url .= '&returnform='.base64_encode(json_encode($return_form)); if (!headers_sent()) { header("Location: $backup_url", true, 302); } // Let's add a fallback for redirections, in case headers were already sent echo ''."\n"; echo 'If you are not redirected in 10 seconds, please click here to take a backup before updating WordPress.'; die();