diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php
index 9c3b494043..17c7bb3326 100644
--- a/wp-admin/includes/template.php
+++ b/wp-admin/includes/template.php
@@ -39,7 +39,6 @@ function _cat_rows( $categories, &$count, $parent = 0, $level = 0, $page = 1, $p
// If the page starts in a subtree, print the parents.
if ( $count == $start && $category->parent > 0 ) {
$my_parents = array();
- $my_parent = $category->parent;
while ( $my_parent) {
$my_parent = get_category($my_parent);
$my_parents[] = $my_parent;
@@ -174,17 +173,40 @@ function link_cat_row( $category ) {
$category->count = number_format_i18n( $category->count );
$count = ( $category->count > 0 ) ? "$category->count" : $category->count;
- $output = "
- ";
- if ( absint( get_option( 'default_link_category' ) ) != $category->term_id ) {
- $output .= "";
- } else {
- $output .= " ";
+ $output = " |
";
+ $columns = get_column_headers('link-category');
+ $hidden = (array) get_user_option( 'manage-link-category-columns-hidden' );
+ foreach ( $columns as $column_name => $column_display_name ) {
+ $class = "class=\"$column_name column-$column_name\"";
+
+ $style = '';
+ if ( in_array($column_name, $hidden) )
+ $style = ' style="display:none;"';
+
+ $attributes = "$class$style";
+
+ switch ($column_name) {
+ case 'cb':
+ $output .= "";
+ if ( absint( get_option( 'default_link_category' ) ) != $category->term_id ) {
+ $output .= "";
+ } else {
+ $output .= " ";
+ }
+ $output .= " | ";
+ break;
+ case 'name':
+ $output .= "$edit | ";
+ break;
+ case 'description':
+ $output .= "$category->description | ";
+ break;
+ case 'links':
+ $attributes = 'class="links column-links num"' . $style;
+ $output .= "$count | ";
+ }
}
- $output .= "
- $edit |
- $category->description |
- $count |
";
+ $output .= '';
return apply_filters( 'link_cat_row', $output );
}