From 04a3b1c246db7a3ef18a9ba88f82bee39ed0815e Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 25 Jan 2007 02:02:21 +0000 Subject: [PATCH] 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 --- wp-includes/bookmark-template.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/wp-includes/bookmark-template.php b/wp-includes/bookmark-template.php index 746f7fc178..0770268190 100644 --- a/wp-includes/bookmark-template.php +++ b/wp-includes/bookmark-template.php @@ -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); - $output .= "$title_before$title_li$title_after\n\t\n$category_after\n"; + 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\n$category_after\n"; + } else { + $output .= _walk_bookmarks($bookmarks, $r); + } } }