in TwentyFourteen: don't add the `has-post-thumbnail` class or print the featured image when viewing an attachment.

See #27243.


Built from https://develop.svn.wordpress.org/trunk@27330


git-svn-id: http://core.svn.wordpress.org/trunk@27182 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-02-28 21:57:13 +00:00
parent 412ea898c0
commit 6df629fb02
2 changed files with 2 additions and 2 deletions

View File

@ -461,7 +461,7 @@ add_filter( 'body_class', 'twentyfourteen_body_classes' );
* @return array The filtered post class list.
*/
function twentyfourteen_post_classes( $classes ) {
if ( ! post_password_required() && has_post_thumbnail() ) {
if ( ! post_password_required() && ! is_attachment() && has_post_thumbnail() ) {
$classes[] = 'has-post-thumbnail';
}

View File

@ -175,7 +175,7 @@ add_action( 'save_post', 'twentyfourteen_category_transient_flusher' );
* @return void
*/
function twentyfourteen_post_thumbnail() {
if ( post_password_required() || ! has_post_thumbnail() ) {
if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {
return;
}