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 ) ? "<a href='edit.php?tag=$tag->slug'>$count</a>" : $count; $name = apply_filters( 'term_name', $tag->name ); + $edit_link = "edit-tags.php?action=edit&tag_ID=$tag->term_id"; $out = ''; $out .= '<tr id="tag-' . $tag->term_id . '"' . $class . '>'; $out .= '<th scope="row" class="check-column"> <input type="checkbox" name="delete_tags[]" value="' . $tag->term_id . '" /></th>'; - $out .= '<td><strong><a class="row-title" href="edit-tags.php?action=edit&tag_ID=' . $tag->term_id . '" title="' . attribute_escape(sprintf(__('Edit "%s"'), $name)) . '">' . - $name . '</a></strong></td>'; + $out .= '<td><strong><a class="row-title" href="$edit_link" title="' . attribute_escape(sprintf(__('Edit "%s"'), $name)) . '">' . $name . '</a></strong><br />'; + $actions = array(); + $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>'; + $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("edit-tags.php?action=delete&tag_ID=$tag->term_id", 'delete-tag_' . $tag->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') . "</a>"; + $action_count = count($actions); + $i = 0; + foreach ( $actions as $action => $link ) { + ++$i; + ( $i == $action_count ) ? $sep = '' : $sep = ' | '; + $out .= "<span class='$action'>$link$sep</span>"; + } + $out .= '</td>'; $out .= "<td class='num'>$count</td>"; $out .= '</tr>';