[wp-trac] [WordPress Trac] #41842: pingback() doesn't return anything

WordPress Trac noreply at wordpress.org
Thu Sep 14 04:12:14 UTC 2017


#41842: pingback() doesn't return anything
------------------------------------------+------------------------------
 Reporter:  mrmadhat                      |       Owner:
     Type:  enhancement                   |      Status:  new
 Priority:  low                           |   Milestone:  Awaiting Review
Component:  Pings/Trackbacks              |     Version:  2.1
 Severity:  minor                         |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |     Focuses:
------------------------------------------+------------------------------
Changes (by dshanske):

 * priority:  normal => low
 * severity:  normal => minor


Comment:

 This is a good simple fix, but this is problematic because it doesn't
 really validate whether it worked per se, it measures whether or not the
 post ID exists. It doesn't measure whether the pingbacks themselves
 succeed.

 So the question is...what is success and failure in this case?

 What I would suggest is splitting sending a single pingback into its own
 function, for example, 'ping' with the arguments $pagelinkedfrom,
 $pagelinkedto which will return success of failure for a single ping.

 The problem is then...if a URL has multiple links in it, and it tries to
 ping all of them, what constitutes failure? Do they all have to be true?
 Sometimes, some of them don't have pingback support? Is that a success or
 a failure?

 It may be better to return a WP_Error object that can attach additional
 data.

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


More information about the wp-trac mailing list