+ $name = apply_filters( 'term_name', $tag->name );
+ $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></td>';
+
+ $out .= "<td class='num'>$count</td>";
+ $out .= '</tr>';
+
+ return $out;
+}
+
+// Outputs appropriate rows for the Nth page of the Tag Management screen,
+// assuming M tags displayed at a time on the page
+// Returns the number of tags displayed
+function tag_rows( $page = 1, $pagesize = 20, $searchterms = '' ) {
+
+ // Get a page worth of tags
+ $start = ($page - 1) * $pagesize;
+
+ $args = array('offset' => $start, 'number' => $pagesize, 'hide_empty' => 0);
+
+ if ( !empty( $searchterms ) ) {
+ $args['search'] = $searchterms;
+ }
+
+ $tags = get_terms( 'post_tag', $args );
+
+ // convert it to table rows
+ $out = '';
+ $class = '';
+ $count = 0;
+ foreach( $tags as $tag )
+ $out .= _tag_row( $tag, ++$count % 2 ? ' class="alternate"' : '' );
+
+ // filter and send to screen
+ $out = apply_filters('tag_rows', $out);
+ echo $out;
+ return $count;
+}
+
+// define the columns to display, the syntax is 'internal name' => 'display name'
+function wp_manage_posts_columns() {
+ $posts_columns = array();
+ $posts_columns['cb'] = '<input type="checkbox" onclick="checkAll(document.getElementById(\'posts-filter\'));" />';
+ if ( 'draft' === $_GET['post_status'] )
+ $posts_columns['modified'] = __('Modified');
+ elseif ( 'pending' === $_GET['post_status'] )
+ $posts_columns['modified'] = __('Submitted');
+ else
+ $posts_columns['date'] = __('Date');
+ $posts_columns['title'] = __('Title');
+ $posts_columns['author'] = __('Author');
+ $posts_columns['categories'] = __('Categories');
+ $posts_columns['tags'] = __('Tags');
+ if ( !in_array($_GET['post_status'], array('pending', 'draft', 'future')) )
+ $posts_columns['comments'] = '<div class="vers"><img alt="Comments" src="images/comment-grey-bubble.png" /></div>';
+ $posts_columns['status'] = __('Status');
+ $posts_columns = apply_filters('manage_posts_columns', $posts_columns);
+
+ return $posts_columns;
+}