http_headers_useragent WordPress Filter Hook

The HTTP headers sent by the user's browser can be accessed via the http_headers_useragent hook. This can be useful for debugging or for tracking down browser-specific issues.

apply_filters( 'http_headers_useragent', string $user_agent, string $url ) #

Filters the user agent value sent with an HTTP request.


Parameters

$user_agent

(string)WordPress user agent string.

$url

(string)The request URL.


Top ↑

Source

File: wp-includes/class-wp-http.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.1.0The $url parameter was added.
2.7.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.