[wp-trac] [WordPress Trac] #36576: Split do_all_pings

WordPress Trac noreply at wordpress.org
Wed Oct 7 18:07:49 UTC 2020


#36576: Split do_all_pings
-------------------------------------------------+-------------------------
 Reporter:  dshanske                             |       Owner:  dshanske
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  5.6
Component:  Pings/Trackbacks                     |     Version:  2.1
 Severity:  trivial                              |  Resolution:
 Keywords:  has-patch needs-unit-tests needs-    |     Focuses:
  refresh needs-dev-note                         |
-------------------------------------------------+-------------------------

Comment (by dshanske):

 @Mista-Flo I am a bit confused about what unit testing is required or what
 refresh. There is effectively no change. Three sets of code were in one
 function hooked into an action, they are now separate functions hooked
 into the same action, so they can be individually removed. The code in
 question was already being unit tested.

 @hellofromTonya Where does one write a dev note? If I were to note it
 here, it would say, "Since WordPress 2.1, do_all_pings has, every time a
 post is published, queried for all pending pingbacks, trackbacks, and
 enclosures, regardless of whether you are actually using these features.
 It is hooked into the do_pings action. This change splits each query into
 its own function(do_pingbacks, do_enclosures, do_trackbacks), which are
 added to the do_pings action so you could remove one or more on systems
 not using them. The do_all_pings function is retained for backward
 compatibility and now calls the individual functions."

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


More information about the wp-trac mailing list