Have wp_referer_field() set the referer to the current page. fixes #2800
git-svn-id: https://develop.svn.wordpress.org/trunk@3919 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
11a6312a36
commit
98b02c5e7c
@ -815,8 +815,7 @@ function wp_nonce_field($action = -1) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function wp_referer_field() {
|
function wp_referer_field() {
|
||||||
$ref = ( false === wp_get_referer() ) ? $_SERVER['REQUEST_URI'] : wp_get_referer();
|
$ref = wp_specialchars($_SERVER['REQUEST_URI']);
|
||||||
$ref = wp_specialchars(stripslashes($ref));
|
|
||||||
echo '<input type="hidden" name="_wp_http_referer" value="'. $ref . '" />';
|
echo '<input type="hidden" name="_wp_http_referer" value="'. $ref . '" />';
|
||||||
if ( wp_get_original_referer() ) {
|
if ( wp_get_original_referer() ) {
|
||||||
$original_ref = wp_specialchars(stripslashes(wp_get_original_referer()));
|
$original_ref = wp_specialchars(stripslashes(wp_get_original_referer()));
|
||||||
|
Loading…
Reference in New Issue
Block a user