Consolidate *backs filter. Preserve filter settings when filetering by post. Props Viper007Bond. fixes #7920
git-svn-id: http://svn.automattic.com/wordpress/trunk@9247 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a4f5971898
commit
985a5b4a3f
|
@ -157,11 +157,10 @@ unset($status_links);
|
||||||
<select name="comment_type">
|
<select name="comment_type">
|
||||||
<option value="all"><?php _e('Show all comment types'); ?></option>
|
<option value="all"><?php _e('Show all comment types'); ?></option>
|
||||||
<?php
|
<?php
|
||||||
$comment_types = array(
|
$comment_types = apply_filters( 'admin_comment_types_dropdown', array(
|
||||||
'comment' => __('Comments'),
|
'comment' => __('Comments'),
|
||||||
'pingback' => __('Pingbacks'),
|
'pings' => __('Pings'),
|
||||||
'trackback' => __('Trackbacks'),
|
) );
|
||||||
);
|
|
||||||
|
|
||||||
foreach ( $comment_types as $type => $label ) {
|
foreach ( $comment_types as $type => $label ) {
|
||||||
echo " <option value='$type'";
|
echo " <option value='$type'";
|
||||||
|
|
|
@ -1785,6 +1785,8 @@ function _wp_get_comment_list( $status = '', $s = false, $start, $num, $post = 0
|
||||||
$typesql = "AND comment_type = 'pingback'";
|
$typesql = "AND comment_type = 'pingback'";
|
||||||
elseif ( 'trackback' == $type )
|
elseif ( 'trackback' == $type )
|
||||||
$typesql = "AND comment_type = 'trackback'";
|
$typesql = "AND comment_type = 'trackback'";
|
||||||
|
elseif ( 'pings' == $type )
|
||||||
|
$typesql = "AND ( comment_type = 'pingback' OR comment_type = 'trackback' )";
|
||||||
else
|
else
|
||||||
$typesql = '';
|
$typesql = '';
|
||||||
|
|
||||||
|
@ -1943,7 +1945,9 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true
|
||||||
case 'response':
|
case 'response':
|
||||||
echo "<td $attributes>\n";
|
echo "<td $attributes>\n";
|
||||||
echo ""$post_link" ";
|
echo ""$post_link" ";
|
||||||
echo '<a href="edit-comments.php?p=' . $post->ID . '">' . sprintf ( __ngettext('(%s comment)', '(%s comments)', $post->comment_count), $post->comment_count ) . '</a><br />';
|
echo '<a href="edit-comments.php?p=' . $post->ID;
|
||||||
|
if ( !empty($_GET['comment_type']) ) echo '&comment_type=' . htmlspecialchars( $_GET['comment_type'] );
|
||||||
|
echo '">' . sprintf ( __ngettext('(%s comment)', '(%s comments)', $post->comment_count), $post->comment_count ) . '</a><br />';
|
||||||
echo get_the_time(__('Y/m/d \a\t g:ia'));
|
echo get_the_time(__('Y/m/d \a\t g:ia'));
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue