From 07731fae29fe930ee0ada6c0681200d57f15f400 Mon Sep 17 00:00:00 2001 From: emc3 Date: Mon, 26 Jan 2004 01:59:09 +0000 Subject: [PATCH] Fix hide_empty for list_cats() git-svn-id: http://svn.automattic.com/wordpress/trunk@795 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/template-functions.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/wp-includes/template-functions.php b/wp-includes/template-functions.php index 5ac10fd8b..8a0220d58 100644 --- a/wp-includes/template-functions.php +++ b/wp-includes/template-functions.php @@ -1543,10 +1543,12 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde if (intval($optiondates) == 1) { $link .= ' '.$category->lastday.'/'.$category->lastmonth; } - if ($list) { - echo "\t
  • $link
  • \n"; - } else { - echo "\t$link
    \n"; + if (!$hide_empty || $category_posts[$category->cat_ID]) { + if ($list) { + echo "\t
  • $link
  • \n"; + } else { + echo "\t$link
    \n"; + } } } }