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

git-svn-id: https://develop.svn.wordpress.org/trunk@5530 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2007-05-23 18:59:12 +00:00
parent 2b134cc1f7
commit 3261234a0d
4 changed files with 35 additions and 35 deletions

View File

@@ -167,7 +167,7 @@ function get_linkcatname($id = 0) {
$cat_id = (int) $cats[0]; // Take the first cat.
$cat = get_category($cat_id);
return $cat->cat_name;
return $cat->name;
}
/** function links_popup_script()
@@ -229,9 +229,9 @@ function get_links_list($order = 'name', $hide_if_empty = 'obsolete') {
// Handle each category.
// Display the category name
echo ' <li id="linkcat-' . $cat->cat_ID . '" class="linkcat"><h2>' . $cat->cat_name . "</h2>\n\t<ul>\n";
echo ' <li id="linkcat-' . $cat->term_id . '" class="linkcat"><h2>' . $cat->name . "</h2>\n\t<ul>\n";
// Call get_links() with all the appropriate params
get_links($cat->cat_ID, '<li>', "</li>", "\n", true, 'name', false);
get_links($cat->term_id, '<li>', "</li>", "\n", true, 'name', false);
// Close the last category
echo "\n\t</ul>\n</li>\n";
@@ -336,12 +336,12 @@ function wp_list_bookmarks($args = '') {
$cats = get_categories("type=link&category_name=$category_name&include=$category&orderby=$category_orderby&order=$category_order&hierarchical=0");
foreach ( (array) $cats as $cat ) {
$params = array_merge($r, array('category'=>$cat->cat_ID));
$params = array_merge($r, array('category'=>$cat->term_id));
$bookmarks = get_bookmarks($params);
if ( empty($bookmarks) )
continue;
$output .= str_replace(array('%id', '%class'), array("linkcat-$cat->cat_ID", $class), $category_before);
$catname = apply_filters( "link_category", $cat->cat_name );
$output .= str_replace(array('%id', '%class'), array("linkcat-$cat->term_id", $class), $category_before);
$catname = apply_filters( "link_category", $cat->name );
$output .= "$title_before$catname$title_after\n\t<ul>\n";
$output .= _walk_bookmarks($bookmarks, $r);
$output .= "\n\t</ul>\n$category_after\n";