[wp-trac] [WordPress Trac] #25241: Allow apply_filters and do_action to accept a $tag array

WordPress Trac noreply at wordpress.org
Fri Sep 6 20:02:35 UTC 2013

#25241: Allow apply_filters and do_action to accept a $tag array
 Reporter:  sc0ttkclark               |       Owner:
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  Plugins                   |     Version:  3.6
 Severity:  normal                    |  Resolution:
 Keywords:  dev-feedback needs-patch  |

Comment (by nacin):

 I think the question is the same: Why?

 In many cases, sequential hooks won't have the same arguments passed.
 That's not the case for the ones you highlighted, but it is for many

 It's also much more difficult to grok/read/understand. If you're looking
 for a filter, you now need to closely pay attention to make sure you're
 clearly noticing what the variable is being filtered (and generally,
 parameters being passed), as suddenly there is an array with commas for
 tag names.

 Finally, there's no real benefit. The one benefit *could* be if the tags
 were not processed in order, and instead were merge and sorted by
 priority. So if you registered against `save_post` for `11` and
 `wp_insert_post` for `10`, the callback attached to `wp_insert_post` would
 be fired first. Of course, this could only happen for new hooks, not old
 ones, because it would be a functionality change. But this too is tough to

Ticket URL: <http://core.trac.wordpress.org/ticket/25241#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list