Add a post class if a password is required for the post to be displayed. See #13860 props zeo.
git-svn-id: https://develop.svn.wordpress.org/trunk@16138 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a0349d55a1
commit
3462e6af43
@ -327,11 +327,15 @@ function get_post_class( $class = '', $post_id = null ) {
|
||||
$classes[] = $post->post_type;
|
||||
$classes[] = 'type-' . $post->post_type;
|
||||
|
||||
// post requires password
|
||||
if ( post_password_required($post->ID) )
|
||||
$classes[] = 'post-password-required';
|
||||
|
||||
// sticky for Sticky Posts
|
||||
if ( is_sticky($post->ID) && is_home() && !is_paged() )
|
||||
$classes[] = 'sticky';
|
||||
|
||||
// hentry for hAtom compliace
|
||||
// hentry for hAtom compliance
|
||||
$classes[] = 'hentry';
|
||||
|
||||
// Categories
|
||||
|
Loading…
Reference in New Issue
Block a user