Ticket #7552: extra-tag-cat-columns.diff
File extra-tag-cat-columns.diff, 2.5 KB (added by , 16 years ago) |
---|
-
wp-admin/includes/template.php
81 81 $pad = str_repeat( '— ', $level ); 82 82 $name = ( $name_override ? $name_override : $pad . ' ' . $category->name ); 83 83 $edit_link = "categories.php?action=edit&cat_ID=$category->term_id"; 84 85 if ( 0 == $category->parent ) 86 $parent = $parentname = ''; 87 else 88 $parent = $parentname = get_the_category_by_ID( $category->parent ); 89 84 90 if ( current_user_can( 'manage_categories' ) ) { 85 $edit = "<a class='row-title' href='$edit_link' title='" . attribute_escape(sprintf(__('Edit "%s"'), $category->name)) . "'> $name</a><br />";91 $edit = "<a class='row-title' href='$edit_link' title='" . attribute_escape(sprintf(__('Edit "%s"'), $category->name)) . "'>" . attribute_escape( $name ) . '</a><br />'; 86 92 $actions = array(); 87 93 $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>'; 88 94 if ( $default_cat_id != $category->term_id ) … … 94 100 ( $i == $action_count ) ? $sep = '' : $sep = ' | '; 95 101 $edit .= "<span class='$action'>$link$sep</span>"; 96 102 } 103 if ( 0 != $category->parent ) 104 $parent = "<a href='categories.php?action=edit&cat_ID=$category->parent' title='" . attribute_escape(sprintf(__('Edit "%s"'), $parentname)) . "'>" . attribute_escape( $parentname ) . '</a>'; 97 105 } else { 98 106 $edit = $name; 99 107 } … … 131 139 case 'description': 132 140 $output .= "<td $attributes>$category->description</td>"; 133 141 break; 142 case 'parent': 143 $output .= "<td $attributes>$parent</td>"; 144 break; 145 case 'slug': 146 $output .= "<td $attributes>$category->slug</td>"; 147 break; 134 148 case 'posts': 135 149 $attributes = 'class="posts column-posts num"' . $style; 136 150 $output .= "<td $attributes>$posts_count</td>\n"; … … 401 415 } 402 416 $out .= '</td>'; 403 417 break; 418 case 'slug': 419 $out .= "<td $attributes>$tag->slug</td>"; 420 break; 404 421 case 'posts': 405 422 $attributes = 'class="posts column-posts num"' . $style; 406 423 $out .= "<td $attributes>$count</td>"; … … 544 561 'cb' => '<input type="checkbox" />', 545 562 'name' => __('Name'), 546 563 'description' => __('Description'), 564 'parent' => __('Parent'), 565 'slug' => __('Slug'), 547 566 'posts' => __('Posts') 548 567 ); 549 568 … … 561 580 $columns = array( 562 581 'cb' => '<input type="checkbox" />', 563 582 'name' => __('Name'), 583 'slug' => __('Slug'), 564 584 'posts' => __('Posts') 565 585 ); 566 586