get_http_origin

Advertisement

Summery Summery

Get the HTTP Origin of the current request.

Syntax Syntax

get_http_origin()

Return Return

(string) URL of the origin. Empty string if no origin.

Source Source

File: wp-includes/http.php

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

	/**
	 * Change 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 );
}

/**

Advertisement

Changelog Changelog

Changelog
Version Description
3.4.0 Introduced.

Advertisement

Leave a Reply