wp_get_original_referer(): string|false

Retrieve original referer that was posted, if it exists.


Return

string|false Original referer URL on success, false on failure.


Top ↑

More Information

HTTP referer is a server variable. ‘referer’ is deliberately miss-spelled.


Top ↑

Source

File: wp-includes/functions.php. View all references

function wp_get_original_referer() {
	if ( ! empty( $_REQUEST['_wp_original_http_referer'] ) && function_exists( 'wp_validate_redirect' ) ) {
		return wp_validate_redirect( wp_unslash( $_REQUEST['_wp_original_http_referer'] ), false );
	}

	return false;
}


Top ↑

Changelog

Changelog
Version Description
2.0.4 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.