Make WordPress Core

Ticket #17771: 17771.patch

File 17771.patch, 913 bytes (added by chriscct7, 8 years ago)
  • src/wp-includes/comment-functions.php

     
    22882288                if ( $pingback_server_url ) {
    22892289                        @ set_time_limit( 60 );
    22902290                        // Now, the RPC call
    2291                         $pagelinkedfrom = get_permalink($post_ID);
     2291                        $pagelinkedfrom = get_permalink( $post_ID );
    22922292
     2293                        if ( strlen( $pagelinkedfrom ) > 200 ) {
     2294                                $shortlink = wp_get_shortlink( $post_ID );
     2295                                $pagelinkedfrom = ! empty( $shortlink ) ? $shortlink : $pagelinkedfrom;
     2296                        }                       
     2297
    22932298                        // using a timeout of 3 seconds should be enough to cover slow servers
    2294                         $client = new WP_HTTP_IXR_Client($pingback_server_url);
     2299                        $client = new WP_HTTP_IXR_Client( $pingback_server_url );
    22952300                        $client->timeout = 3;
    22962301                        /**
    22972302                         * Filter the user agent sent when pinging-back a URL.