Uses
Uses | Description |
---|---|
wp-includes/formatting.php: wp_unslash() | Remove slashes from a string or array of strings. |
Retrieves unvalidated referer from ‘_wp_http_referer’ or HTTP referer.
Do not use for redirects, use wp_get_referer() instead.
(string|false) Referer URL on success, false on failure.
File: wp-includes/functions.php
function wp_get_raw_referer() { if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) { return wp_unslash( $_REQUEST['_wp_http_referer'] ); } elseif ( ! empty( $_SERVER['HTTP_REFERER'] ) ) { return wp_unslash( $_SERVER['HTTP_REFERER'] ); } return false; }
Version | Description |
---|---|
4.5.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_get_raw_referer