wpseek.com
A WordPress-centric search engine for devs and theme authors



get_http_origin › WordPress Function

Since3.4.0
Deprecatedn/a
get_http_origin ( No parameters )
Returns:
  • (string) URL of the origin. Empty string if no origin.
Defined at:
Codex:

Gets the HTTP Origin of the current request.



Source

function get_http_origin() {
	$origin = '';
	if ( ! empty( $_SERVER['HTTP_ORIGIN'] ) ) {
		$origin = $_SERVER['HTTP_ORIGIN'];
	}

	/**
	 * Changes the origin of an HTTP request.
	 *
	 * @since 3.4.0
	 *
	 * @param string $origin The original origin for the request.
	 */
	return apply_filters( 'http_origin', $origin );
}