From 4b9c7b3e1d5c4f3a6832a37e929e9b7fcf0c03b7 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 5 Jul 2014 00:12:46 +0000 Subject: [PATCH] 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 --- src/wp-includes/post-template.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index f3a65dfa82..00a030250f 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -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';