Make WordPress Core


Ignore:
Timestamp:
05/23/2007 06:59:12 PM (18 years ago)
Author:
ryan
Message:

Convert category queries and list cats to taxonomy. see #4189

File:
1 edited

Legend:

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

    r5444 r5530  
    168168
    169169    $cat = get_category($cat_id);
    170     return $cat->cat_name;
     170    return $cat->name;
    171171}
    172172
     
    230230
    231231            // Display the category name
    232             echo '  <li id="linkcat-' . $cat->cat_ID . '" class="linkcat"><h2>' . $cat->cat_name . "</h2>\n\t<ul>\n";
     232            echo '  <li id="linkcat-' . $cat->term_id . '" class="linkcat"><h2>' . $cat->name . "</h2>\n\t<ul>\n";
    233233            // Call get_links() with all the appropriate params
    234             get_links($cat->cat_ID, '<li>', "</li>", "\n", true, 'name', false);
     234            get_links($cat->term_id, '<li>', "</li>", "\n", true, 'name', false);
    235235
    236236            // Close the last category
     
    337337
    338338        foreach ( (array) $cats as $cat ) {
    339             $params = array_merge($r, array('category'=>$cat->cat_ID));
     339            $params = array_merge($r, array('category'=>$cat->term_id));
    340340            $bookmarks = get_bookmarks($params);
    341341            if ( empty($bookmarks) )
    342342                continue;
    343             $output .= str_replace(array('%id', '%class'), array("linkcat-$cat->cat_ID", $class), $category_before);
    344             $catname = apply_filters( "link_category", $cat->cat_name );
     343            $output .= str_replace(array('%id', '%class'), array("linkcat-$cat->term_id", $class), $category_before);
     344            $catname = apply_filters( "link_category", $cat->name );
    345345            $output .= "$title_before$catname$title_after\n\t<ul>\n";
    346346            $output .= _walk_bookmarks($bookmarks, $r);
Note: See TracChangeset for help on using the changeset viewer.