wpseek.com
A WordPress-centric search engine for devs and theme authors
wp_get_raw_referer › WordPress Function
Since4.5.0
Deprecatedn/a
› wp_get_raw_referer ( No parameters )
Returns: |
|
Defined at: |
|
Codex: |
Retrieves unvalidated referer from the '_wp_http_referer' URL query variable or the HTTP referer.
If the value of the '_wp_http_referer' URL query variable is not a string then it will be ignored. Do not use for redirects, use wp_get_referer() instead.Related Functions: wp_get_referer, wp_get_original_referer, wp_get_user_request, wp_get_current_user, wp_get_wp_version
Source
function wp_get_raw_referer() { if ( ! empty( $_REQUEST['_wp_http_referer'] ) && is_string( $_REQUEST['_wp_http_referer'] ) ) { return wp_unslash( $_REQUEST['_wp_http_referer'] ); } elseif ( ! empty( $_SERVER['HTTP_REFERER'] ) ) { return wp_unslash( $_SERVER['HTTP_REFERER'] ); } return false; }