Opened 12 years ago
Closed 10 years ago
#22590 closed enhancement (fixed)
get_post_class() do not set 'sticky' class in administration posts table
Reported by: | corsonr | Owned by: | |
---|---|---|---|
Milestone: | 4.0 | Priority: | normal |
Severity: | minor | Version: | 3.4.2 |
Component: | Posts, Post Types | Keywords: | has-patch needs-testing |
Focuses: | ui, administration | Cc: |
Description (last modified by )
get_post_class() does set a 'sticky' class to sticky post on the frontend but not in the administration. So, there's no way to differentiate a sticky post from another non-sticky post excepted the span element to its right.
Adding something similar to this fix the problem:
// sticky for Sticky Posts in administration if ( is_sticky($post->ID) && is_admin() ) $classes[] = 'post-sticky';
Attachments (2)
Change History (12)
#4
@
12 years ago
Here is an simple example i did with this plugin: http://remicorson.com/color-my-posts/
#5
@
12 years ago
here is another sample of how this can be used, http://codecanyon.net/item/color-my-posts-pro/3653526
Note: See
TracTickets for help on using
tickets.
This seems like an easy win. I'd say +1, except I wonder if there other existing instances of applying post classes in the admin and if so, what are their use-cases in core?