[wp-hackers] 0001191: Add query string style API to wp_get_links()

David House dmhouse at gmail.com
Fri Apr 1 10:22:20 GMT 2005


Sure, but this is sounding a bit like a broken record. We've had a
discussion, right back in July last year, about how parameters should
be passed. We decided URL format is okay, but the associative array
format discussed is better. Reference [1] outlines the problem and
solution pretty well.

[1]: http://comox.textdrive.com/pipermail/hackers/2004-July/000901.html

By the way, URL-style and associate array-style parameters are
compatible, if Owen Winkler's fix_params() function is applied:

function fix_params($params, $defaults = array())
{
	if(!is_array($params)) {
		parse_str($params, $ary);
		return array_merge($defaults, $ary);
	}
	return array_merge($defaults, $params);
}

-- 
-David House, dmhouse at gmail.com


More information about the wp-hackers mailing list