summaryrefslogtreecommitdiffstats
path: root/wp-includes/classes.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-12-01 15:41:48 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-12-01 15:41:48 +0000
commitf57c5009b529dcc2494fc719f605ef64b7f9b4c7 (patch)
treea2987f298fd6ebeca0dc4c0e286a969745f1a497 /wp-includes/classes.php
parentaae5b160f307adf0703ae8f7c2b158b91570ec95 (diff)
downloadwordpress-mu-f57c5009b529dcc2494fc719f605ef64b7f9b4c7.tar.gz
wordpress-mu-f57c5009b529dcc2494fc719f605ef64b7f9b4c7.tar.xz
wordpress-mu-f57c5009b529dcc2494fc719f605ef64b7f9b4c7.zip
Category fixes from Andy
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@818 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/classes.php')
-rw-r--r--wp-includes/classes.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/wp-includes/classes.php b/wp-includes/classes.php
index f60b50d..f8bb896 100644
--- a/wp-includes/classes.php
+++ b/wp-includes/classes.php
@@ -616,13 +616,14 @@ class Walker_Category extends Walker {
$link .= ' ' . gmdate('Y-m-d', $category->last_update_timestamp);
}
- $_current_category = get_category( $current_category );
+ if ( $current_category )
+ $_current_category = get_category( $current_category );
if ( 'list' == $args['style'] ) {
$output .= "\t<li";
- if ( ($category->cat_ID == $current_category) && is_category() )
+ if ( $current_category && ($category->cat_ID == $current_category) )
$output .= ' class="current-cat"';
- elseif ( ($category->cat_ID == $_current_category->category_parent) && is_category() )
+ elseif ( $_current_category && ($category->cat_ID == $_current_category->category_parent) )
$output .= ' class="current-cat-parent"';
$output .= ">$link\n";
} else {