Make WordPress Core

Ticket #38197: 38197.diff

File 38197.diff, 1.4 KB (added by NathanAtmoz, 7 years ago)
  • src/wp-includes/comment.php

    diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php
    index 7055db7..0f6a4e1 100644
    a b function generic_ping( $post_id = 0 ) { 
    25502550 *
    25512551 * @param string $content Post content to check for links. If empty will retrieve from post.
    25522552 * @param int|WP_Post $post_id Post Object or ID.
     2553 * @return array An array of pingback statuses.
    25532554 */
    25542555function pingback( $content, $post_id ) {
    25552556        include_once( ABSPATH . WPINC . '/class-IXR.php' );
    function pingback( $content, $post_id ) { 
    26062607         */
    26072608        do_action_ref_array( 'pre_ping', array( &$post_links, &$pung, $post->ID ) );
    26082609
     2610        $ping_status = array();
     2611
    26092612        foreach ( (array) $post_links as $pagelinkedto ) {
    26102613                $pingback_server_url = discover_pingback_server_uri( $pagelinkedto );
    26112614
    function pingback( $content, $post_id ) { 
    26332636                        // when set to true, this outputs debug messages by itself
    26342637                        $client->debug = false;
    26352638
    2636                         if ( $client->query('pingback.ping', $pagelinkedfrom, $pagelinkedto) || ( isset($client->error->code) && 48 == $client->error->code ) ) // Already registered
     2639                        if ( $status = $client->query( 'pingback.ping', $pagelinkedfrom, $pagelinkedto )  || ( isset( $client->error->code ) && 48 == $client->error->code ) ) {
    26372640                                add_ping( $post, $pagelinkedto );
     2641                        }
     2642                        $ping_status[ $pagelinkedto ] = $status;
    26382643                }
    26392644        }
     2645        return $ping_status;
    26402646}
    26412647
    26422648/**