From fa6b9e781ad84f0a4f2a41c5e1868a6094a78c7d Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 10 Jul 2006 16:34:43 +0000 Subject: [PATCH] Use wp_die() in wp_nonce_ays(). fixes #2929 git-svn-id: https://develop.svn.wordpress.org/trunk@4009 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 ?>