get_http_origin()
Gets the HTTP Origin of the current request.
Хуки из функции
Возвращает
Строку. URL of the origin. Empty string if no origin.
Использование
get_http_origin();
Список изменений
| С версии 3.4.0 | Введена. |
Код get_http_origin() get http origin WP 6.9.1
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 HTTP origin for the request.
*/
return apply_filters( 'http_origin', $origin );
}