Uses
Uses | Description |
---|---|
wp-includes/formatting.php: wp_unslash() | Remove slashes from a string or array of strings. |
wp-includes/pluggable.php: wp_validate_redirect() | Validates a URL for use in a redirect. |
Retrieve original referer that was posted, if it exists.
(string|false) Original referer URL on success, false on failure.
HTTP referer
is a server variable. ‘referer’ is deliberately miss-spelled.
File: wp-includes/functions.php
function wp_get_original_referer() { if ( ! empty( $_REQUEST['_wp_original_http_referer'] ) && function_exists( 'wp_validate_redirect' ) ) { return wp_validate_redirect( wp_unslash( $_REQUEST['_wp_original_http_referer'] ), false ); } return false; }
Version | Description |
---|---|
2.0.4 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_get_original_referer