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

WordPress Trac noreply at wordpress.org
Thu Oct 1 02:46:42 UTC 2015


#26673: Enhance wp_parse_args() by adding filters before/after the array_merge()
-------------------------------------------------+-------------------------
 Reporter:  johnjamesjacoby                      |       Owner:
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
Component:  General                              |  Review
 Severity:  normal                               |     Version:
 Keywords:  has-patch dev-feedback close 2nd-    |  Resolution:
  opinion                                        |     Focuses:
-------------------------------------------------+-------------------------
Changes (by DrewAPicture):

 * keywords:  has-patch dev-feedback => has-patch dev-feedback close 2nd-
     opinion


Comment:

 I agree with everything in comment:6 from @nacin, especially:

 > Filters, in general, increase the maintenance burden on the codebase. If
 `wp_parse_args()` gained a filter, it would be extremely hard to keep
 usage of that filter backwards compatible, especially as functions evolve
 over time. If the filter was explicitly declared instead, it could A) have
 its own explicit documentation, B) be passed context based on other
 arguments of the function, C) allow the inputs and outputs of
 wp_parse_args() to be changed at will, based on evolution of the codebase.

 I vote wontfix here.

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


More information about the wp-trac mailing list