diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-06-13 17:21:00 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-06-13 17:21:00 +0000 |
commit | 12de05107e4c8b006bde6ee8916f34eb476d08da (patch) | |
tree | 123ee54ecd1f3f777373b7df54a4604012d43640 /wp-includes/category-template.php | |
parent | e51c7a9ca4bfdb45fa3ec7334bd33871e78c68b1 (diff) | |
download | wordpress-mu-12de05107e4c8b006bde6ee8916f34eb476d08da.tar.gz wordpress-mu-12de05107e4c8b006bde6ee8916f34eb476d08da.tar.xz wordpress-mu-12de05107e4c8b006bde6ee8916f34eb476d08da.zip |
WP Merge with revision 8075
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1328 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/category-template.php')
-rw-r--r-- | wp-includes/category-template.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index ba24302..1217276 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -185,9 +185,12 @@ function in_category( $category ) { // Check if the current post is in the given if ( empty($category) ) return false; - $cat_ID = get_cat_ID($category); - if ( $cat_ID ) - $category = $cat_ID; + // If category is not an int, check to see if it's a name + if ( ! is_int($category) ) { + $cat_ID = get_cat_ID($category); + if ( $cat_ID ) + $category = $cat_ID; + } $categories = get_object_term_cache($post->ID, 'category'); if ( false === $categories ) @@ -272,7 +275,7 @@ function wp_list_categories($args = '') { 'style' => 'list', 'show_count' => 0, 'hide_empty' => 1, 'use_desc_for_title' => 1, 'child_of' => 0, 'feed' => '', 'feed_type' => '', - 'feed_image' => '', 'exclude' => '', + 'feed_image' => '', 'exclude' => '', 'current_category' => 0, 'hierarchical' => true, 'title_li' => __('Categories'), 'echo' => 1, 'depth' => 0 ); @@ -309,7 +312,7 @@ function wp_list_categories($args = '') { else $output .= '<a href="' . get_bloginfo('url') . '">' . $show_option_all . '</a>'; - if ( is_category() ) + if ( empty( $r['current_category'] ) && is_category() ) $r['current_category'] = $wp_query->get_queried_object_id(); if ( $hierarchical ) |