Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_get_raw_referer ›

Da4.5.0
Deprecaton/a
wp_get_raw_referer ( Nessun parametro )
Ritorna:
  • (string|false) Referer URL on success, false on failure.
Definito a:
Codex:

Retrieves unvalidated referer from '_wp_http_referer' or HTTP referer.

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



Sorgenti

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