wp-admin/includes/class-wp-comments-list-table.php:234One hook fires while WP_Comments_List_Table::get_views() runs, in this order:
Filters the comment status links.
protected function get_views() { global $post_id, $comment_status, $comment_type; $status_links = array(); $num_comments = ( $post_id ) ? wp_count_comments( $post_id ) : wp_count_comments(); $statuses = array( /* translators: %s: Number of comments. */ 'all' => _nx_noop( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', 'comments' ), // Singular not used. /* translators: %s: Number of comments. */ 'mine' => _nx_noop( 'Mine <span class="count">(%s)</span>', 'Mine <span class="count">(%s)</span>', 'comments' ), /* translators: %s: Number of comments. */ 'moderated' => _nx_noop( 'Pending <span class="count">(%s)</span>', 'Pending <span class="count">(%s)</span>', 'comments' ), /* translators: %s: Number of comments. */ 'approved' => _nx_noop( 'Approved <span class="count">(%s)</span>', 'Approved <span class="count">(%s)</span>', 'comments' ), /* translators: %s: Number of comments. */ 'spam' => _nx_noop( 'Spam <span class="count">(%s)</span>', 'Spam <span class="count">(%s)</span>', 'comments' ), /* translators: %s: Number of comments. */ 'trash' => _nx_noop( 'Trash <span class="count">(%s)</span>', 'Trash <span class="count">(%s)</span>', 'comments' ), ); if ( ! EMPTY_TRASH_DAYS ) { unset( $statuses['trash'] ); } $link = admin_url( 'edit-comments.php' ); if ( ! empty( $comment_type ) && 'all' !== $comment_type ) { $link = add_query_arg( 'comment_type', $comment_type, $link ); } foreach ( $statuses as $status => $label ) { if ( 'mine' === $status ) { $current_user_id = get_current_user_id(); $num_comments->mine = get_comments( array( 'post_id' => $post_id ? $post_id : 0, 'user_id' => $current_user_id, 'count' => true, 'orderby' => 'none', ) ); $link = add_query_arg( 'user_id', $current_user_id, $link ); } else { $link = remove_query_arg( 'user_id', $link ); } if ( ! isset( $num_comments->$status ) ) { $num_comments->$status = 10; }One change between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
none to array<string,.verified against sourcesrc/wp-admin/includes/class-wp-comments-list-table.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.