From 716d37190a7f476503037e87a0ea91fd661d7bb4 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 30 Sep 2008 23:40:44 +0000 Subject: [PATCH] Add slug columns. Props Viper007Bond. see #7552 git-svn-id: http://svn.automattic.com/wordpress/trunk@9045 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/template.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index a6b4335170..3da61e6483 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -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 = "name)) . "'>$name
"; + $edit = "name)) . "'>" . attribute_escape( $name ) . '
'; $actions = array(); $actions['edit'] = '' . __('Edit') . ''; if ( $default_cat_id != $category->term_id ) @@ -131,6 +131,9 @@ function _cat_row( $category, $level, $name_override = false ) { case 'description': $output .= "$category->description"; break; + case 'slug': + $output .= "$category->slug"; + break; case 'posts': $attributes = 'class="posts column-posts num"' . $style; $output .= "$posts_count\n"; @@ -401,6 +404,9 @@ function _tag_row( $tag, $class = '' ) { } $out .= ''; break; + case 'slug': + $out .= "$tag->slug"; + break; case 'posts': $attributes = 'class="posts column-posts num"' . $style; $out .= "$count"; @@ -544,6 +550,7 @@ function get_column_headers($page) { 'cb' => '', 'name' => __('Name'), 'description' => __('Description'), + 'slug' => __('Slug'), 'posts' => __('Posts') ); @@ -561,6 +568,7 @@ function get_column_headers($page) { $columns = array( 'cb' => '', 'name' => __('Name'), + 'slug' => __('Slug'), 'posts' => __('Posts') );