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

WordPress Trac noreply at wordpress.org
Sun Oct 11 21:33:54 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-dev-note dev-feedback  |     Focuses:
---------------------------------------------------+-----------------------

Comment (by garrett-eclipse):

 Could we leave a `do_all_pings` function and call action, and inside the
 do_all_pings function call the others seperately?
 So if you remove do_all_pings all would be disabled. But you could also
 selectively disable from their own actions.

 {{{#!php
 <?php
 function do_all_pings() {
     do_action( 'doing_pings' );
 }
 add_action( 'do_pings', 'do_all_pings', 10, 0 );
 add_action( 'doing_pings', 'do_pingbacks', 10, 0 );
 add_action( 'doing_pings', 'do_enclosures', 10, 0 );
 add_action( 'doing_pings', 'do_tracksbacks', 10, 0 );
 add_action( 'doing_pings', 'generic_ping', 10, 0 );
 }}}

 This leaves the ability to remove all pings, but also introduces the
 ability to remove specific pings.

 Thoughts?

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


More information about the wp-trac mailing list