Add slug columns. Props Viper007Bond. see #7552

git-svn-id: https://develop.svn.wordpress.org/trunk@9045 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-09-30 23:40:44 +00:00
parent 070c8bb262
commit 1d24033d9d
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')
);