Use wp_die() in wp_nonce_ays(). fixes #2929

git-svn-id: http://svn.automattic.com/wordpress/trunk@4009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-07-10 16:34:43 +00:00
parent 2a8de5229b
commit 577dbc08c6
1 changed files with 5 additions and 5 deletions

View File

@ -1094,7 +1094,6 @@ function wp_nonce_ays($action) {
$adminurl = wp_get_referer();
$title = __('WordPress Confirmation');
require_once(ABSPATH . '/wp-admin/admin-header.php');
// Remove extra layer of slashes.
$_POST = stripslashes_deep($_POST );
if ( $_POST ) {
@ -1112,18 +1111,19 @@ function wp_nonce_ays($action) {
$html .= "\t<div id='message' class='confirm fade'>\n\t<p>" . wp_explain_nonce($action) . "</p>\n\t<p><a href='$adminurl'>" . __('No') . "</a> <a href='" . add_query_arg( '_wpnonce', wp_create_nonce($action), $_SERVER['REQUEST_URI'] ) . "'>" . __('Yes') . "</a></p>\n\t</div>\n";
}
$html .= "</body>\n</html>";
echo $html;
include_once(ABSPATH . '/wp-admin/admin-footer.php');
wp_die($html, $title);
}
function wp_die($message) {
function wp_die($message, $title = '') {
header('Content-Type: text/html; charset=utf-8');
if ( empty($title) )
$title = __('WordPress &rsaquo; Error');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>WordPress &rsaquo; <?php _e('Error'); ?></title>
<title><?php echo $title ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style media="screen" type="text/css">
<!--