Uma área de pesquisa sobre o WordPress para devs e autores do tema



wp_get_raw_referer ›

Desde4.5.0
Obsoleton/a
wp_get_raw_referer ( Sem parâmetros )
Retorna:
  • (string|false) Referer URL on success, false on failure.
Definido em:
Codex:

Retrieves unvalidated referer from '_wp_http_referer' or HTTP referer.

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



Fonte

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