[wp-trac] [WordPress Trac] #26673: Enhance wp_parse_args() by adding filters before/after the array_merge()

WordPress Trac noreply at wordpress.org
Wed Dec 18 19:01:19 UTC 2013


#26673: Enhance wp_parse_args() by adding filters before/after the array_merge()
-----------------------------------+------------------
 Reporter:  johnjamesjacoby        |       Owner:
     Type:  enhancement            |      Status:  new
 Priority:  normal                 |   Milestone:  3.9
Component:  Plugins                |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |
-----------------------------------+------------------

Comment (by johnjamesjacoby):

 Replying to [comment:7 MikeSchinkel]:
 > It's rare for me to argue against a filter but I have to side with
 @nacin on this one.  Adding a filter here if used could increase the
 potential for unwanted side-effects more than a trivial amount. and for
 code that uses `wp_parse_args()` ''**a lot** (like my libraries)'' it
 could have significant performance implications.
 You've misunderstood the code. If your libraries don't pass a filter key,
 nothing changes -- no filters are applied, and no micro-performance hit
 occurs as a result of your code.

 > Much better to use/add targeted, low impact filters and actions, IMHO at
 least.
 There's nothing wrong with targeted filters and actions, and I'm not
 trying to eliminate them. This isn't one VS the other.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/26673#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list