From 4a5da512e21b7a74b97d03303fcd215d38ffef87 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 16 Sep 2008 23:17:03 +0000 Subject: [PATCH] Edit and Delete links for tags page. see #7552 git-svn-id: http://svn.automattic.com/wordpress/trunk@8908 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/template.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 2aa72e0804..16e59857d7 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -298,11 +298,22 @@ function _tag_row( $tag, $class = '' ) { $count = ( $count > 0 ) ? "$count" : $count; $name = apply_filters( 'term_name', $tag->name ); + $edit_link = "edit-tags.php?action=edit&tag_ID=$tag->term_id"; $out = ''; $out .= ''; $out .= ' '; - $out .= '' . - $name . ''; + $out .= '' . $name . '
'; + $actions = array(); + $actions['edit'] = '' . __('Edit') . ''; + $actions['delete'] = "term_id) . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this tag '%s'\n 'Cancel' to stop, 'OK' to delete."), $name )) . "') ) { return true;}return false;\">" . __('Delete') . ""; + $action_count = count($actions); + $i = 0; + foreach ( $actions as $action => $link ) { + ++$i; + ( $i == $action_count ) ? $sep = '' : $sep = ' | '; + $out .= "$link$sep"; + } + $out .= ''; $out .= "$count"; $out .= '';