Changeset 10239 for trunk/wp-admin/includes/template.php
- Timestamp:
- 12/22/2008 07:33:09 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/template.php
r10222 r10239 582 582 * @return unknown 583 583 */ 584 function _tag_row( $tag, $class = '' ) {584 function _tag_row( $tag, $class = '', $taxonomy = 'post_tag' ) { 585 585 $count = number_format_i18n( $tag->count ); 586 586 $count = ( $count > 0 ) ? "<a href='edit.php?tag=$tag->slug'>$count</a>" : $count; 587 587 588 588 $name = apply_filters( 'term_name', $tag->name ); 589 $qe_data = get_term($tag->term_id, 'post_tag', object, 'edit');590 $edit_link = "edit-tags.php?action=edit&ta g_ID=$tag->term_id";589 $qe_data = get_term($tag->term_id, $taxonomy, object, 'edit'); 590 $edit_link = "edit-tags.php?action=edit&taxonomy=$taxonomy&tag_ID=$tag->term_id"; 591 591 $out = ''; 592 592 $out .= '<tr id="tag-' . $tag->term_id . '"' . $class . '>'; … … 611 611 $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>'; 612 612 $actions['inline hide-if-no-js'] = '<a href="#" class="editinline">' . __('Quick Edit') . '</a>'; 613 $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("edit-tags.php?action=delete&ta g_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>";613 $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("edit-tags.php?action=delete&taxonomy=$taxonomy&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>"; 614 614 $action_count = count($actions); 615 615 $i = 0; … … 653 653 * @return unknown 654 654 */ 655 function tag_rows( $page = 1, $pagesize = 20, $searchterms = '' ) {655 function tag_rows( $page = 1, $pagesize = 20, $searchterms = '', $taxonomy = 'post_tag' ) { 656 656 657 657 // Get a page worth of tags … … 664 664 } 665 665 666 $tags = get_terms( 'post_tag', $args );666 $tags = get_terms( $taxonomy, $args ); 667 667 668 668 // convert it to table rows … … 670 670 $count = 0; 671 671 foreach( $tags as $tag ) 672 $out .= _tag_row( $tag, ++$count % 2 ? ' class="iedit alternate"' : ' class="iedit"' );672 $out .= _tag_row( $tag, ++$count % 2 ? ' class="iedit alternate"' : ' class="iedit"', $taxonomy ); 673 673 674 674 // filter and send to screen
Note: See TracChangeset
for help on using the changeset viewer.