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:
parent
2a8de5229b
commit
577dbc08c6
|
@ -1094,7 +1094,6 @@ function wp_nonce_ays($action) {
|
||||||
$adminurl = wp_get_referer();
|
$adminurl = wp_get_referer();
|
||||||
|
|
||||||
$title = __('WordPress Confirmation');
|
$title = __('WordPress Confirmation');
|
||||||
require_once(ABSPATH . '/wp-admin/admin-header.php');
|
|
||||||
// Remove extra layer of slashes.
|
// Remove extra layer of slashes.
|
||||||
$_POST = stripslashes_deep($_POST );
|
$_POST = stripslashes_deep($_POST );
|
||||||
if ( $_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 .= "\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>";
|
$html .= "</body>\n</html>";
|
||||||
echo $html;
|
wp_die($html, $title);
|
||||||
include_once(ABSPATH . '/wp-admin/admin-footer.php');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function wp_die($message) {
|
function wp_die($message, $title = '') {
|
||||||
header('Content-Type: text/html; charset=utf-8');
|
header('Content-Type: text/html; charset=utf-8');
|
||||||
|
|
||||||
|
if ( empty($title) )
|
||||||
|
$title = __('WordPress › Error');
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!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">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<title>WordPress › <?php _e('Error'); ?></title>
|
<title><?php echo $title ?></title>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<style media="screen" type="text/css">
|
<style media="screen" type="text/css">
|
||||||
<!--
|
<!--
|
||||||
|
|
Loading…
Reference in New Issue