WordPress.org

Make WordPress Core

Changeset 9247


Ignore:
Timestamp:
10/19/08 00:38:29 (6 years ago)
Author:
ryan
Message:

Consolidate *backs filter. Preserve filter settings when filetering by post. Props Viper007Bond. fixes #7920

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-comments.php

    r9233 r9247  
    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 ) { 
  • trunk/wp-admin/includes/template.php

    r9240 r9247  
    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 = ''; 
     
    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>'; 
Note: See TracChangeset for help on using the changeset viewer.