Make WordPress Core

Ticket #7920: 7920.patch

File 7920.patch, 1.8 KB (added by Viper007Bond, 18 years ago)
  • wp-admin/edit-comments.php

     
    157157<select name="comment_type">
    158158        <option value="all"><?php _e('Show all comment types'); ?></option>
    159159<?php
    160         $comment_types = array(
     160        $comment_types = apply_filters( 'admin_comment_types_dropdown', array(
    161161                'comment' => __('Comments'),
    162                 'pingback' => __('Pingbacks'),
    163                 'trackback' => __('Trackbacks'),
    164         );
     162                'pings' => __('Pings'),
     163        ) );
    165164
    166165        foreach ( $comment_types as $type => $label ) {
    167166                echo "  <option value='$type'";
  • wp-admin/includes/template.php

     
    17851785                $typesql = "AND comment_type = 'pingback'";
    17861786        elseif ( 'trackback' == $type )
    17871787                $typesql = "AND comment_type = 'trackback'";
     1788        elseif ( 'pings' == $type )
     1789                $typesql = "AND ( comment_type = 'pingback' OR comment_type = 'trackback' )";
    17881790        else
    17891791                $typesql = '';
    17901792
     
    19431945                        case 'response':
    19441946                                echo "<td $attributes>\n";
    19451947                                echo "&quot;$post_link&quot; ";
    1946                                 echo '<a href="edit-comments.php?p=' . $post->ID . '">' . sprintf ( __ngettext('(%s comment)', '(%s comments)', $post->comment_count), $post->comment_count ) . '</a><br />';
     1948                                echo '<a href="edit-comments.php?p=' . $post->ID;
     1949                                if ( !empty($_GET['comment_type']) ) echo '&amp;comment_type=' . htmlspecialchars( $_GET['comment_type'] );
     1950                                echo '">' . sprintf ( __ngettext('(%s comment)', '(%s comments)', $post->comment_count), $post->comment_count ) . '</a><br />';
    19471951                                echo get_the_time(__('Y/m/d \a\t g:ia'));
    19481952                                echo '</td>';
    19491953                }