WordPress at a glance

wp_get_raw_referer() WP 1.0

Retrieves unvalidated referer from '_wp_http_referer' or HTTP referer.

Do not use for redirects, use wp_get_referer() instead.

Is the basis for: wp_get_referer()

No Hooks.

Return

String/false. Referer URL on success, false on failure.

Usage

wp_get_raw_referer();

Code of wp get raw referer: wp-includes/functions.php WP 5.2.2

<?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;
}

Related Functions

From category: Uncategorized

No comments
    Hello, !     Log In . Register