Have wp_referer_field() set the referer to the current page. fixes #2800
git-svn-id: http://svn.automattic.com/wordpress/trunk@3919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ec9b6242a3
commit
e344771fa7
|
@ -815,8 +815,7 @@ function wp_nonce_field($action = -1) {
|
|||
}
|
||||
|
||||
function wp_referer_field() {
|
||||
$ref = ( false === wp_get_referer() ) ? $_SERVER['REQUEST_URI'] : wp_get_referer();
|
||||
$ref = wp_specialchars(stripslashes($ref));
|
||||
$ref = wp_specialchars($_SERVER['REQUEST_URI']);
|
||||
echo '<input type="hidden" name="_wp_http_referer" value="'. $ref . '" />';
|
||||
if ( wp_get_original_referer() ) {
|
||||
$original_ref = wp_specialchars(stripslashes(wp_get_original_referer()));
|
||||
|
|
Loading…
Reference in New Issue