Don't output ul when title_li is empty. Props m0n5t3r. fixes #3664
git-svn-id: https://develop.svn.wordpress.org/trunk@4800 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ee4e6927a4
commit
04a3b1c246
@ -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");
|
$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) ) {
|
if ( !empty($bookmarks) ) {
|
||||||
$output .= str_replace(array('%id', '%class'), array("linkuncat", $class), $category_before);
|
if ( !empty( $title_li ) ){
|
||||||
$output .= "$title_before$title_li$title_after\n\t<ul>\n";
|
$output .= str_replace(array('%id', '%class'), array("linkcat-$category", $class), $category_before);
|
||||||
$output .= _walk_bookmarks($bookmarks, $r);
|
$output .= "$title_before$title_li$title_after\n\t<ul>\n";
|
||||||
$output .= "\n\t</ul>\n$category_after\n";
|
$output .= _walk_bookmarks($bookmarks, $r);
|
||||||
|
$output .= "\n\t</ul>\n$category_after\n";
|
||||||
|
} else {
|
||||||
|
$output .= _walk_bookmarks($bookmarks, $r);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user