WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 9 months ago

#22590 closed enhancement

get_post_class() do not set 'sticky' class in administration posts table — at Version 2

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 SergeyBiryukov)

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';

Change History (2)

comment:1 @SergeyBiryukov2 years ago

  • Component changed from Appearance to Administration

comment:2 @SergeyBiryukov2 years ago

  • Description modified (diff)
Note: See TracTickets for help on using tickets.