WordPress.org

Make WordPress Core

Ticket #48721: 48721.diff

File 48721.diff, 804 bytes (added by wpgurudev, 2 years ago)

Pass URL to http_headers_useragent filter

  • src/wp-includes/class-wp-xmlrpc-server.php

    diff --git a/src/wp-includes/class-wp-xmlrpc-server.php b/src/wp-includes/class-wp-xmlrpc-server.php
    index 57d5937ffe..3f7dbe300f 100644
    a b class wp_xmlrpc_server extends IXR_Server { 
    68486848                $remote_ip = preg_replace( '/[^0-9a-fA-F:., ]/', '', $_SERVER['REMOTE_ADDR'] );
    68496849
    68506850                /** This filter is documented in wp-includes/class-http.php */
    6851                 $user_agent = apply_filters( 'http_headers_useragent', 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ), $url );
     6851                $user_agent = apply_filters( 'http_headers_useragent', 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ), $pagelinkedfrom );
    68526852
    68536853                // Let's check the remote site
    68546854                $http_api_args = array(