From 9d3aff53ae4b951e1e150013c90dd3d1ea4c55bd Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 10 Jul 2006 17:21:48 +0000 Subject: [PATCH] Use wp_die() in wp_nonce_ays(). fixes #2929 git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@4010 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 63 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 3 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index dd2d4ba56ab0..ae1d9babfe0b 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -2424,7 +2424,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 ) { @@ -2442,8 +2441,66 @@ function wp_nonce_ays($action) { $html .= "\t
\n\t

" . wp_explain_nonce($action) . "

\n\t

" . __('No') . " " . __('Yes') . "

\n\t
\n"; } $html .= "\n"; - echo $html; - include_once(ABSPATH . '/wp-admin/admin-footer.php'); + wp_die($html, $title); } +function wp_die($message, $title = '') { + header('Content-Type: text/html; charset=utf-8'); + + if ( empty($title) ) + $title = __('WordPress › Error'); ?> + + + + <?php echo $title ?> + + + + +

WordPress

+

+ + + \ No newline at end of file