Add 'status-sticky' class in get_post_class() for sticky posts in the admin.

props mordauk, netweb.
fixes #22590.

git-svn-id: https://develop.svn.wordpress.org/trunk@29003 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2014-07-05 00:12:46 +00:00
parent c1c0693cee
commit 4b9c7b3e1d
1 changed files with 7 additions and 2 deletions

View File

@ -451,8 +451,13 @@ function get_post_class( $class = '', $post_id = null ) {
}
// sticky for Sticky Posts
if ( is_sticky($post->ID) && is_home() && !is_paged() )
$classes[] = 'sticky';
if ( is_sticky( $post->ID ) ) {
if ( is_home() && ! is_paged() ) {
$classes[] = 'sticky';
} elseif ( is_admin() ) {
$classes[] = 'status-sticky';
}
}
// hentry for hAtom compliance
$classes[] = 'hentry';