WordPress.org

Make WordPress Core

Ticket #11317: pingback-useragent-filter.diff

File pingback-useragent-filter.diff, 574 bytes (added by mtdewvirus, 6 years ago)
  • wp-includes/comment.php

     
    16751675                        $client = new IXR_Client($pingback_server_url); 
    16761676                        $client->timeout = 3; 
    16771677                        $client->useragent .= ' -- WordPress/' . $wp_version; 
     1678                        $client->useragent = apply_filters('pingback_useragent', $client->useragent, $pingback_server_url, $pagelinkedto, $pagelinkedfrom); 
    16781679 
    16791680                        // when set to true, this outputs debug messages by itself 
    16801681                        $client->debug = false;