[wp-trac] [WordPress Trac] #19888: We need a recursive version of wp_parse_args(), namely wp_parse_args_r()

WordPress Trac wp-trac at lists.automattic.com
Tue Jan 24 17:25:47 UTC 2012


#19888: We need a recursive version of wp_parse_args(), namely wp_parse_args_r()
-------------------------+------------------------------
 Reporter:  Master Jake  |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------------------

Comment (by Master Jake):

 Ah, I hadn't bothered actually looking at the wp_parse_args implementation
 yet, but it does make since with the whole "query strings can't be
 recursive" ordeal.

 I thought maybe PHP's [http://www.php.net/manual/en/function.array-merge-
 recursive.php array_merge_recursive()] function would take care of this,
 but it seems it has an unexpected result (from a user of wp_parse_arg's
 perspective) of not overwriting previous keys, but instead creating a new
 array with the values from the previous and new key and using that array
 as the new value.

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


More information about the wp-trac mailing list