Make WordPress Core


Ignore:
Timestamp:
04/28/2004 12:03:58 AM (20 years ago)
Author:
saxmatt
Message:

Breaking list_cats some more.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/template-functions-category.php

    r1183 r1191  
    234234function wp_list_cats($args = '') {
    235235    parse_str($args, $r);
    236     if (!isset($r['optionall'])) $r['optionall'] = 1;
     236    if (!isset($r['optionall'])) $r['optionall'] = 0;
    237237    if (!isset($r['all'])) $r['all'] = 'All';
    238238    if (!isset($r['sort_column'])) $r['sort_column'] = 'ID';
     
    255255
    256256function 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 = '') {
    257     global $tablecategories, $tableposts, $tablepost2cat, $wpdb;
     257    global $tablecategories, $tableposts, $tablepost2cat, $wpdb, $category_posts;
    258258    global $pagenow;
    259259    global $querystring_start, $querystring_equal, $querystring_separator;
     
    273273        $categories = $wpdb->get_results($query);
    274274    }
    275     if (intval($hide_empty) == 1 && intval($optioncount) == 1) {
     275    if (intval($hide_empty) == 1 && !isset($category_posts)) {
    276276        $cat_counts = $wpdb->get_results("    SELECT cat_ID,
    277277        COUNT($tablepost2cat.post_id) AS cat_count
Note: See TracChangeset for help on using the changeset viewer.