Don't output ul when title_li is empty. Props m0n5t3r. fixes #3664

git-svn-id: http://svn.automattic.com/wordpress/trunk@4800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-01-25 02:02:21 +00:00
parent 8f58b134c2
commit 33d8407781
1 changed files with 8 additions and 4 deletions

View File

@ -344,10 +344,14 @@ function wp_list_bookmarks($args = '') {
$bookmarks = get_bookmarks("limit=$limit&category=$category&show_updated=$show_updated&orderby=$orderby&order=$order&hide_invisible=$hide_invisible&show_updated=$show_updated");
if ( !empty($bookmarks) ) {
$output .= str_replace(array('%id', '%class'), array("linkuncat", $class), $category_before);
if ( !empty( $title_li ) ){
$output .= str_replace(array('%id', '%class'), array("linkcat-$category", $class), $category_before);
$output .= "$title_before$title_li$title_after\n\t<ul>\n";
$output .= _walk_bookmarks($bookmarks, $r);
$output .= "\n\t</ul>\n$category_after\n";
} else {
$output .= _walk_bookmarks($bookmarks, $r);
}
}
}