Add slug columns. Props Viper007Bond. see #7552

git-svn-id: http://svn.automattic.com/wordpress/trunk@9045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-09-30 23:40:44 +00:00
parent 6ba60d72ad
commit 716d37190a
1 changed files with 9 additions and 1 deletions

View File

@ -82,7 +82,7 @@ function _cat_row( $category, $level, $name_override = false ) {
$name = ( $name_override ? $name_override : $pad . ' ' . $category->name );
$edit_link = "categories.php?action=edit&cat_ID=$category->term_id";
if ( current_user_can( 'manage_categories' ) ) {
$edit = "<a class='row-title' href='$edit_link' title='" . attribute_escape(sprintf(__('Edit "%s"'), $category->name)) . "'>$name</a><br />";
$edit = "<a class='row-title' href='$edit_link' title='" . attribute_escape(sprintf(__('Edit "%s"'), $category->name)) . "'>" . attribute_escape( $name ) . '</a><br />';
$actions = array();
$actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>';
if ( $default_cat_id != $category->term_id )
@ -131,6 +131,9 @@ function _cat_row( $category, $level, $name_override = false ) {
case 'description':
$output .= "<td $attributes>$category->description</td>";
break;
case 'slug':
$output .= "<td $attributes>$category->slug</td>";
break;
case 'posts':
$attributes = 'class="posts column-posts num"' . $style;
$output .= "<td $attributes>$posts_count</td>\n";
@ -401,6 +404,9 @@ function _tag_row( $tag, $class = '' ) {
}
$out .= '</td>';
break;
case 'slug':
$out .= "<td $attributes>$tag->slug</td>";
break;
case 'posts':
$attributes = 'class="posts column-posts num"' . $style;
$out .= "<td $attributes>$count</td>";
@ -544,6 +550,7 @@ function get_column_headers($page) {
'cb' => '<input type="checkbox" />',
'name' => __('Name'),
'description' => __('Description'),
'slug' => __('Slug'),
'posts' => __('Posts')
);
@ -561,6 +568,7 @@ function get_column_headers($page) {
$columns = array(
'cb' => '<input type="checkbox" />',
'name' => __('Name'),
'slug' => __('Slug'),
'posts' => __('Posts')
);