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 ?>