In wp_list_bookmarks(), don't stomp the categorize argument. Fixes categorized display in the links widget.

fixes #22216


git-svn-id: http://core.svn.wordpress.org/trunk@22910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Ryan Boren 2012-11-28 23:19:03 +00:00
parent cbd32060e8
commit efcc9adf34
1 changed files with 6 additions and 5 deletions

View File

@ -212,15 +212,16 @@ function wp_list_bookmarks($args = '') {
$r = wp_parse_args( $args, $defaults );
extract( $r, EXTR_SKIP );
if ( empty( $args['category'] ) )
$categorize = 0;
$output = '';
if ( $categorize ) {
//Split the bookmarks into ul's for each category
$cats = get_terms('link_category', array('name__like' => $category_name, 'include' => $category, 'exclude' => $exclude_category, 'orderby' => $category_orderby, 'order' => $category_order, 'hierarchical' => 0));
$cats = get_terms( 'link_category', array( 'name__like' => $category_name, 'include' => $category, 'exclude' => $exclude_category, 'orderby' => $category_orderby, 'order' => $category_order, 'hierarchical' => 0 ) );
if ( empty( $cats ) )
$categorize = false;
}
if ( $categorize ) {
// Split the bookmarks into ul's for each category
foreach ( (array) $cats as $cat ) {
$params = array_merge($r, array('category'=>$cat->term_id));
$bookmarks = get_bookmarks($params);