get_http_origin

The timeline below displays how wordpress function get_http_origin has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 3.7

/**
 * Get the HTTP Origin of the current request.
 *
 * @since 3.4.0
 *
 * @return string URL of the origin. Empty string if no origin.
 */
function get_http_origin()
{
    $origin = '';
    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);
}