#18516 closed enhancement (fixed)
Add custom class to WP_Posts_List_Table->single_row() output
Reported by: | brandondove | Owned by: | westi |
---|---|---|---|
Milestone: | 3.3 | Priority: | normal |
Severity: | normal | Version: | 3.3 |
Component: | General | Keywords: | westi-likes has-patch |
Focuses: | Cc: |
Description
I am working on a custom post type implemention with some common custom meta information that I want to display in the post list. There is a need to indicate each post's status with a quick visual queue. Since there is no way to target a group of table rows that have certain characteristics, I resorted to highlighting the rows using jQuery.
Looking at the WP_Posts_List_Table class, it seems that this would be an easy problem to solve by simply adding a filter to the table row class list. I'm sure this same concept could also be extended to the other subclasses of WP_List_Table.
Attachments (3)
Change History (14)
#6
@
13 years ago
The new patch uses get_post_class for WP_Posts_List_Table as nacin suggested. Duplicated classes on the table row were removed and author-(self|other) was moved into get_post_class for consistency.
#7
in reply to:
↑ 5
@
13 years ago
Replying to nacin:
It'd probably make sense for us to use post_class() here.
I'm sure I wrote this comment when I accepted the ticket ;)
It'd probably make sense for us to use post_class() here.