4 ms·
WordPress has a similar approach. The wp_parse_args function which accept an array or a URL-like string. You can also pass default values (and extract() them if
by program 14y ago
WordPress has a similar approach. The wp_parse_args function which accept an array or a URL-like string. You can also pass default values (and extract() them if you want.)
http://codex.wordpress.org/Function_Reference/wp_parse_args http://codex.wordpress.org/Function_Reference/wp_parse_args
You can pass the arguments as an array or as a URL-like ampersand separed string.
- mildweed 14y agoWordpress should upgrade wp_parse_args to use this Gist.