WordPress.org

Make WordPress Core

Ticket #38197: 38197.1.diff

File 38197.1.diff, 1.6 KB (added by soulseekah, 21 months ago)

refresh + docblock

  • src/wp-includes/comment.php

    diff --git src/wp-includes/comment.php src/wp-includes/comment.php
    index 595f825..6d04f45 100644
    function generic_ping( $post_id = 0 ) { 
    26862686 *
    26872687 * @since 0.71
    26882688 * @since 4.7.0 `$post_id` can be a WP_Post object.
     2689 * @since 4.9.6 Returns an array of pingback statuses.
    26892690 *
    26902691 * @param string $content Post content to check for links. If empty will retrieve from post.
    26912692 * @param int|WP_Post $post_id Post Object or ID.
     2693 * @return bool[] An array of pingback statuses.
    26922694 */
    26932695function pingback( $content, $post_id ) {
    26942696        include_once( ABSPATH . WPINC . '/class-IXR.php' );
    function pingback( $content, $post_id ) { 
    27462748         */
    27472749        do_action_ref_array( 'pre_ping', array( &$post_links, &$pung, $post->ID ) );
    27482750
     2751        $ping_status = array();
     2752
    27492753        foreach ( (array) $post_links as $pagelinkedto ) {
    27502754                $pingback_server_url = discover_pingback_server_uri( $pagelinkedto );
    27512755
    function pingback( $content, $post_id ) { 
    27732777                        // when set to true, this outputs debug messages by itself
    27742778                        $client->debug = false;
    27752779
    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
    27772781                                add_ping( $post, $pagelinkedto );
    27782782                        }
     2783                        $ping_status[ $pagelinkedto ] = $status;
    27792784                }
    27802785        }
     2786        return $ping_status;
    27812787}
    27822788
    27832789/**