#25814 closed enhancement (fixed)
Not enough params for get_comment_class in WP_Comments_List_Table->display()
Reported by: | drozdz | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 3.8 | Priority: | normal |
Severity: | normal | Version: | 3.3 |
Component: | Administration | Keywords: | has-patch |
Focuses: | Cc: |
Description
On line 314 you can find:
function single_row( $a_comment ) { global $post, $comment; $comment = $a_comment; $the_comment_class = join( ' ', get_comment_class( wp_get_comment_status( $comment->comment_ID ) ) ); $post = get_post( $comment->comment_post_ID ); $this->user_can = current_user_can( 'edit_comment', $comment->comment_ID ); echo "<tr id='comment-$comment->comment_ID' class='$the_comment_class'>"; $this->single_row_columns( $comment ); echo "</tr>\n"; }
It would be much easier to work with it, if get_comment_class would get all params (including comment_ID and post_ID).
Attachments (1)
Change History (3)
#1
@
11 years ago
- Component changed from General to Administration
- Milestone changed from Awaiting Review to 3.8
- Version changed from 3.7.1 to 3.3
Related: [18594] (for #18447).
This would also fix the inconsistent (and potentially incorrect) addition of bypostauthor
class in the admin. Currently it depends on the $post
global, which is set after get_comment_class()
is called:
tags/3.7.1/src/wp-admin/includes/class-wp-comments-list-table.php#L310
tags/3.7.1/src/wp-includes/comment-template.php#L348
Note: See
TracTickets for help on using
tickets.
class-wp-comments-list-table - patch