diff --git a/wp-includes/bookmark-template.php b/wp-includes/bookmark-template.php
index 2a06cf2a2..3d644a6be 100644
--- a/wp-includes/bookmark-template.php
+++ b/wp-includes/bookmark-template.php
@@ -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 '
' . $cat->cat_name . "
\n\t\n";
+ echo ' ' . $cat->name . "
\n\t\n";
// Call get_links() with all the appropriate params
- get_links($cat->cat_ID, '- ', "
", "\n", true, 'name', false);
+ get_links($cat->term_id, '- ', "
", "\n", true, 'name', false);
// Close the last category
echo "\n\t
\n \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\n";
$output .= _walk_bookmarks($bookmarks, $r);
$output .= "\n\t
\n$category_after\n";
diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php
index 78a6e34f1..6aa27db6b 100644
--- a/wp-includes/category-template.php
+++ b/wp-includes/category-template.php
@@ -5,10 +5,10 @@ function get_category_children($id, $before = '/', $after = '') {
return '';
$chain = '';
-
+ // TODO: consult hierarchy
$cat_ids = get_all_category_ids();
foreach ( $cat_ids as $cat_id ) {
- if ( $cat_id == $id)
+ if ( $cat_id == $id )
continue;
$category = get_category($cat_id);
diff --git a/wp-includes/classes.php b/wp-includes/classes.php
index 2363803db..0a285de5b 100644
--- a/wp-includes/classes.php
+++ b/wp-includes/classes.php
@@ -557,7 +557,7 @@ class Walker_PageDropdown extends Walker {
class Walker_Category extends Walker {
var $tree_type = 'category';
- var $db_fields = array ('parent' => 'category_parent', 'id' => 'cat_ID'); //TODO: decouple this
+ var $db_fields = array ('parent' => 'parent', 'id' => 'term_id'); //TODO: decouple this
function start_lvl($output, $depth, $args) {
if ( 'list' != $args['style'] )
@@ -580,13 +580,13 @@ class Walker_Category extends Walker {
function start_el($output, $category, $depth, $args) {
extract($args);
- $cat_name = attribute_escape( $category->cat_name);
+ $cat_name = attribute_escape( $category->name);
$cat_name = apply_filters( 'list_cats', $cat_name, $category );
- $link = 'category_description) )
+ $link = 'description) )
$link .= 'title="' . sprintf(__( 'View all posts filed under %s' ), $cat_name) . '"';
else
- $link .= 'title="' . attribute_escape( apply_filters( 'category_description', $category->category_description, $category )) . '"';
+ $link .= 'title="' . attribute_escape( apply_filters( 'category_description', $category->description, $category )) . '"';
$link .= '>';
$link .= $cat_name . '';
@@ -596,7 +596,7 @@ class Walker_Category extends Walker {
if ( empty($feed_image) )
$link .= '(';
- $link .= 'term_id, $category->slug ) . '"';
if ( empty($feed) )
$alt = ' alt="' . sprintf(__( 'Feed for all posts filed under %s' ), $cat_name ) . '"';
@@ -619,7 +619,7 @@ class Walker_Category extends Walker {
}
if ( isset($show_count) && $show_count )
- $link .= ' (' . intval($category->category_count) . ')';
+ $link .= ' (' . intval($category->count) . ')';
if ( isset($show_date) && $show_date ) {
$link .= ' ' . gmdate('Y-m-d', $category->last_update_timestamp);
@@ -630,9 +630,9 @@ class Walker_Category extends Walker {
if ( 'list' == $args['style'] ) {
$output .= "\t- cat_ID == $current_category) )
+ if ( $current_category && ($category->term_id == $current_category) )
$output .= ' class="current-cat"';
- elseif ( $_current_category && ($category->cat_ID == $_current_category->category_parent) )
+ elseif ( $_current_category && ($category->term_id == $_current_category->parent) )
$output .= ' class="current-cat-parent"';
$output .= ">$link\n";
} else {
@@ -654,19 +654,19 @@ class Walker_Category extends Walker {
class Walker_CategoryDropdown extends Walker {
var $tree_type = 'category';
- var $db_fields = array ('parent' => 'category_parent', 'id' => 'cat_ID'); //TODO: decouple this
+ var $db_fields = array ('parent' => 'parent', 'id' => 'term_id'); //TODO: decouple this
function start_el($output, $category, $depth, $args) {
$pad = str_repeat(' ', $depth * 3);
- $cat_name = apply_filters('list_cats', $category->cat_name, $category);
- $output .= "\t