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