Ticket #1800: highlight-current-cat.diff
| File highlight-current-cat.diff, 1.3 KB (added by , 21 years ago) |
|---|
-
wp-includes/template-functions-category.php
274 274 } 275 275 276 276 function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0, $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=FALSE, $child_of=0, $categories=0, $recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=FALSE) { 277 global $wpdb, $category_posts ;277 global $wpdb, $category_posts, $wp_query; 278 278 // Optiondates now works 279 279 if ( '' == $file ) 280 280 $file = get_settings('home') . '/'; … … 338 338 if ( (intval($hide_empty) == 0 || isset($category_posts["$category->cat_ID"])) && (!$hierarchical || $category->category_parent == $child_of) ) { 339 339 $num_found++; 340 340 $link = '<a href="'.get_category_link($category->cat_ID).'" '; 341 if ($category->cat_ID == $wp_query->get_queried_object_id() && is_category()) { 342 $link .= 'class="current-cat" '; 343 } 341 344 if ( $use_desc_for_title == 0 || empty($category->category_description) ) 342 345 $link .= 'title="'. sprintf(__("View all posts filed under %s"), wp_specialchars($category->cat_name)) . '"'; 343 346 else
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)