[wp-trac] [WordPress Trac] #38197: Update Pingback function To Add Return (was: Deprecate and Replace Pingback() Function)

WordPress Trac noreply at wordpress.org
Sat Oct 15 17:13:40 UTC 2016


#38197: Update Pingback function To Add Return
------------------------------+------------------------------
 Reporter:  dshanske          |       Owner:
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:  Awaiting Review
Component:  Pings/Trackbacks  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  good-first-bug    |     Focuses:  performance
------------------------------+------------------------------
Description changed by dshanske:

Old description:

> Related to #36824.
>
> The current pingback function accepts two parameters...content and
> $post_ID. Suggesting a new function, perhaps send_ping( $post_ID|$post )
> which retrieves the post object instead and gets the content from that.
>
> The current function having to pass the content doesn't make sense. In
> #36824, the proposal was to improve performance of the do_all_pings
> function.
>
> The new function should also optionally return true or a WP_Error object
> in the event the sending fails, for debugging purposes.

New description:

 Related to #36824.

 Updated to reflect focus on the return issue.

 In #36824, the proposal was to improve performance of the do_all_pings
 function. Part of this involves the fact that if a pending trackback URL
 is sent a pingback successfully, it should not also send a trackback.

 The function should also optionally return which URLs were successfully
 pinged or a WP_Error object in the event the sending fails, etc.

 This would change the signature of the function but would allow for
 debugging, response to errors, as well as assist in optimizing the
 do_all_pings function.

 The original proposal was to deprecate pingback because it includes
 $content, a parameter better retrieved from the post itself for purposes
 of integrity. However, that can be addressed in other ways.

--

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38197#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list