From e980dee752773e6f375916ba5caf633235e1622b Mon Sep 17 00:00:00 2001 From: Dougal Campbell Date: Mon, 26 Jan 2004 01:59:09 +0000 Subject: [PATCH] Fix hide_empty for list_cats() git-svn-id: https://develop.svn.wordpress.org/trunk@795 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 5ac10fd8bd..8a0220d581 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"; + } } } }