http_headers_useragent

http_headers_useragent

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('http_headers_useragent') is found 2 times:

  • /wp-includes/class-wp-http.php line 206
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    *
     * @param string $user_agent WordPress user agent string.
     * @param string $url        The request URL.
     */
    'user-agent'          => apply_filters( 'http_headers_useragent', 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ), $url ),
    /**
     * Filters whether to pass URLs through wp_http_validate_url() in an HTTP request.
     *
     * @since 3.6.0
     * @since 5.1.0 The `$url` parameter was added.
     *
  • /wp-includes/class-wp-xmlrpc-server.php line 6960
    6957
    6958
    6959
    6960
    6961
    6962
    6963
    6964
    6965
    6966
    $remote_ip = preg_replace( '/[^0-9a-fA-F:., ]/', '', $_SERVER['REMOTE_ADDR'] );
     
    /** This filter is documented in wp-includes/class-wp-http.php */
    $user_agent = apply_filters( 'http_headers_useragent', 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ), $pagelinkedfrom );
     
    // Let's check the remote site.
    $http_api_args = array(
        'timeout'             => 10,
        'redirection'         => 0,
        'limit_response_size' => 153600, // 150 KB