diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index dbfddb7ffe..1c98e49ede 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -451,11 +451,17 @@ function get_post_class( $class = '', $post_id = null ) { $classes[] = 'format-standard'; } - // Post requires password - if ( post_password_required( $post->ID ) ) { + $post_password_required = post_password_required( $post->ID ); + + // Post requires password. + if ( $post_password_required ) { $classes[] = 'post-password-required'; - // Post thumbnails - } elseif ( ! is_attachment( $post ) && current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail( $post->ID ) ) { + } elseif ( ! empty( $post->post_password ) ) { + $classes[] = 'post-password-protected'; + } + + // Post thumbnails. + if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail( $post->ID ) && ! is_attachment( $post ) && ! $post_password_required ) { $classes[] = 'has-post-thumbnail'; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 49f981f591..6618c9e291 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34880'; +$wp_version = '4.4-alpha-34881'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.