Uses
Uses | Description |
---|---|
wp-includes/http.php: http_origin | Change the origin of an HTTP request. |
wp-includes/plugin.php: apply_filters() | Calls the callback functions that have been added to a filter hook. |
Get the HTTP Origin of the current request.
(string) URL of the origin. Empty string if no origin.
File: wp-includes/http.php
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 ); }
Version | Description |
---|---|
3.4.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_http_origin