diff --git src/wp-includes/comment.php src/wp-includes/comment.php
index 595f825..6d04f45 100644
|
|
function generic_ping( $post_id = 0 ) { |
2686 | 2686 | * |
2687 | 2687 | * @since 0.71 |
2688 | 2688 | * @since 4.7.0 `$post_id` can be a WP_Post object. |
| 2689 | * @since 4.9.6 Returns an array of pingback statuses. |
2689 | 2690 | * |
2690 | 2691 | * @param string $content Post content to check for links. If empty will retrieve from post. |
2691 | 2692 | * @param int|WP_Post $post_id Post Object or ID. |
| 2693 | * @return bool[] An array of pingback statuses. |
2692 | 2694 | */ |
2693 | 2695 | function pingback( $content, $post_id ) { |
2694 | 2696 | include_once( ABSPATH . WPINC . '/class-IXR.php' ); |
… |
… |
function pingback( $content, $post_id ) { |
2746 | 2748 | */ |
2747 | 2749 | do_action_ref_array( 'pre_ping', array( &$post_links, &$pung, $post->ID ) ); |
2748 | 2750 | |
| 2751 | $ping_status = array(); |
| 2752 | |
2749 | 2753 | foreach ( (array) $post_links as $pagelinkedto ) { |
2750 | 2754 | $pingback_server_url = discover_pingback_server_uri( $pagelinkedto ); |
2751 | 2755 | |
… |
… |
function pingback( $content, $post_id ) { |
2773 | 2777 | // when set to true, this outputs debug messages by itself |
2774 | 2778 | $client->debug = false; |
2775 | 2779 | |
2776 | | if ( $client->query( 'pingback.ping', $pagelinkedfrom, $pagelinkedto ) || ( isset( $client->error->code ) && 48 == $client->error->code ) ) { // Already registered |
| 2780 | if ( $status = $client->query( 'pingback.ping', $pagelinkedfrom, $pagelinkedto ) || ( isset( $client->error->code ) && 48 == $client->error->code ) ) { // Already registered |
2777 | 2781 | add_ping( $post, $pagelinkedto ); |
2778 | 2782 | } |
| 2783 | $ping_status[ $pagelinkedto ] = $status; |
2779 | 2784 | } |
2780 | 2785 | } |
| 2786 | return $ping_status; |
2781 | 2787 | } |
2782 | 2788 | |
2783 | 2789 | /** |