Make WordPress Core


Ignore:
Timestamp:
12/22/2008 07:33:09 PM (17 years ago)
Author:
ryan
Message:

get_previous_comments_link() and get_next_comments_link(). Props Viper007Bond. fixes #8058 for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r10222 r10239  
    582582 * @return unknown
    583583 */
    584 function _tag_row( $tag, $class = '' ) {
     584function _tag_row( $tag, $class = '', $taxonomy = 'post_tag' ) {
    585585        $count = number_format_i18n( $tag->count );
    586586        $count = ( $count > 0 ) ? "<a href='edit.php?tag=$tag->slug'>$count</a>" : $count;
    587587
    588588        $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&amp;tag_ID=$tag->term_id";
     589        $qe_data = get_term($tag->term_id, $taxonomy, object, 'edit');
     590        $edit_link = "edit-tags.php?action=edit&amp;taxonomy=$taxonomy&amp;tag_ID=$tag->term_id";
    591591        $out = '';
    592592        $out .= '<tr id="tag-' . $tag->term_id . '"' . $class . '>';
     
    611611                    $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>';
    612612                    $actions['inline hide-if-no-js'] = '<a href="#" class="editinline">' . __('Quick&nbsp;Edit') . '</a>';
    613                     $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("edit-tags.php?action=delete&amp;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>";
     613                    $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("edit-tags.php?action=delete&amp;taxonomy=$taxonomy&amp;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>";
    614614                    $action_count = count($actions);
    615615                    $i = 0;
     
    653653 * @return unknown
    654654 */
    655 function tag_rows( $page = 1, $pagesize = 20, $searchterms = '' ) {
     655function tag_rows( $page = 1, $pagesize = 20, $searchterms = '', $taxonomy = 'post_tag' ) {
    656656
    657657    // Get a page worth of tags
     
    664664    }
    665665
    666     $tags = get_terms( 'post_tag', $args );
     666    $tags = get_terms( $taxonomy, $args );
    667667
    668668    // convert it to table rows
     
    670670    $count = 0;
    671671    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 );
    673673
    674674    // filter and send to screen
Note: See TracChangeset for help on using the changeset viewer.