[wp-trac] [WordPress Trac] #3898: wp_list_bookmarks doesn't pass parameters to get_bookmarks

WordPress Trac wp-trac at lists.automattic.com
Fri Mar 2 01:16:04 GMT 2007


#3898: wp_list_bookmarks doesn't pass parameters to get_bookmarks
---------------------+------------------------------------------------------
 Reporter:  Otto42   |       Owner:  anonymous
     Type:  defect   |      Status:  new      
 Priority:  normal   |   Milestone:  2.1.2    
Component:  General  |     Version:  2.1.1    
 Severity:  normal   |    Keywords:           
---------------------+------------------------------------------------------
 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.

 For example:
 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.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/3898>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list