From 577dbc08c6b30a29069079dca0dc6481b5912de0 Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 10 Jul 2006 16:34:43 +0000 Subject: [PATCH] Use wp_die() in wp_nonce_ays(). fixes #2929 git-svn-id: http://svn.automattic.com/wordpress/trunk@4009 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 97231f90ba..caf1529536 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -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
\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) { +function wp_die($message, $title = '') { header('Content-Type: text/html; charset=utf-8'); + if ( empty($title) ) + $title = __('WordPress › Error'); ?> - WordPress › <?php _e('Error'); ?> + <?php echo $title ?>