wp_list_bookmarks doesn't pass parameters to get_bookmarks
|Reported by:||Otto42||Owned by:||ryan|
The wp_list_bookmarks function in 2.1.1 repeats several parameters along to get_bookmarks in a rather unusual manner. In so doing, it fails to pass along potentially useful parameters that would allow the function to expand in scope. This also makes several of the parameters given for the wp_list_bookmarks function in the codex not work.
wp_list_bookmarks('include=1') should cause just bookmark with ID 1 to be displayed (ignoring categories). However, because the parameter is not passed along to get_bookmarks, include does not work at all. Same for most of get_bookmarks parameters.
The fix is to eliminate the string being passed to get_bookmarks and replace it with the parameter array, as is done in most other functions of this nature. One exception must be made, to pass the correct category when looping through categories. This is done with an array_merge to create a new array with the category overwritten.