X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/11be8dc178e77d0b46189bbd8e33a216a9b90942..4f4e083f6f77639c41e2b1ddb200de8e34301cee:/wp-admin/edit-comments.php diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index 43eecffc..7df02103 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -83,20 +83,22 @@ else require_once('admin-header.php'); -$mode = ( ! isset($_GET['mode']) || empty($_GET['mode']) ) ? 'detail' : attribute_escape($_GET['mode']); +$mode = ( ! isset($_GET['mode']) || empty($_GET['mode']) ) ? 'detail' : esc_attr($_GET['mode']); -$comment_status = !empty($_GET['comment_status']) ? attribute_escape($_GET['comment_status']) : ''; +$comment_status = isset($_REQUEST['comment_status']) ? $_REQUEST['comment_status'] : 'all'; +if ( !in_array($comment_status, array('all', 'moderated', 'approved', 'spam')) ) + $comment_status = 'all'; -$comment_type = !empty($_GET['comment_type']) ? attribute_escape($_GET['comment_type']) : ''; +$comment_type = !empty($_GET['comment_type']) ? esc_attr($_GET['comment_type']) : ''; $search_dirty = ( isset($_GET['s']) ) ? $_GET['s'] : ''; -$search = attribute_escape( $search_dirty ); ?> +$search = esc_attr( $search_dirty ); ?>
';
if ( $approved > 0 ) {
- printf( __ngettext( '%s comment approved', '%s comments approved', $approved ), $approved );
+ printf( _n( '%s comment approved', '%s comments approved', $approved ), $approved );
echo '
';
}
if ( $deleted > 0 ) {
- printf( __ngettext( '%s comment deleted', '%s comments deleted', $deleted ), $deleted );
+ printf( _n( '%s comment deleted', '%s comments deleted', $deleted ), $deleted );
echo '
';
}
if ( $spam > 0 ) {
- printf( __ngettext( '%s comment marked as spam', '%s comments marked as spam', $spam ), $spam );
+ printf( _n( '%s comment marked as spam', '%s comments marked as spam', $spam ), $spam );
echo '
';
}
@@ -136,34 +138,31 @@ $num_comments = ( $post_id ) ? wp_count_comments( $post_id ) : wp_count_comments
//, number_format_i18n($num_comments->moderated) ), "" . number_format_i18n($num_comments->moderated) . ""),
//, number_format_i18n($num_comments->spam) ), "" . number_format_i18n($num_comments->spam) . "")
$stati = array(
- 'all' => __ngettext_noop('All', 'All'), // singular not used
- 'moderated' => __ngettext_noop('Pending (%s)', 'Pending (%s)'),
- 'approved' => __ngettext_noop('Approved', 'Approved'), // singular not used
- 'spam' => __ngettext_noop('Spam (%s)', 'Spam (%s)')
+ 'all' => _n_noop('All', 'All'), // singular not used
+ 'moderated' => _n_noop('Pending (%s)', 'Pending (%s)'),
+ 'approved' => _n_noop('Approved', 'Approved'), // singular not used
+ 'spam' => _n_noop('Spam (%s)', 'Spam (%s)')
);
-$class = ( '' === $comment_status ) ? ' class="current"' : '';
-// $status_links[] = "
- - - + + +
- + - + - - + +