[wp-trac] [WordPress Trac] #6722: wp_list_bookmarks() bug when filtering on category_name

WordPress Trac wp-trac at lists.automattic.com
Mon Apr 14 16:45:10 GMT 2008


#6722: wp_list_bookmarks() bug when filtering on category_name
---------------------+------------------------------------------------------
 Reporter:  drdavid  |       Owner:  anonymous
     Type:  defect   |      Status:  new      
 Priority:  normal   |   Milestone:  2.5.1    
Component:  General  |     Version:  2.5      
 Severity:  normal   |    Keywords:           
---------------------+------------------------------------------------------
 When supplying the category_name argument to wp_list_bookmarks() in an
 attempt to only obtain the bookmarks in that category, this fails.

 I have traced the error back to the following line (line 175 in
 wp_includes/bookmark-template.php in revision 7634):

 `$cats = get_terms('link_category',
 "category_name=$category_name&include=$category&orderby=$category_orderby&order=$category_order&hierarchical=0");`

 The argument to get_terms() is wrong, it should be '''`name__like=`'''
 instead of '''`category_name=`''':

 `$cats = get_terms('link_category',
 "name__like=$category_name&include=$category&orderby=$category_orderby&order=$category_order&hierarchical=0");`

 Works for me.

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


More information about the wp-trac mailing list