http_headers_useragent

http_headers_useragent

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

See hook in core

Displaying hooks found in version: wordpress-6.5.2

apply_filters('http_headers_useragent') is found 2 times:

  • /wp-includes/class-wp-http.php line 192
    			 *
    			 * @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
     
    		$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