From 0b139765c19b6b36cea81491bd6fbb59b4c0a3cb Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Fri, 28 Feb 2014 21:56:23 +0000 Subject: [PATCH] in TwentyFourteen: don't add the `has-post-thumbnail` class or print the featured image when viewing an attachment. See #27243. git-svn-id: https://develop.svn.wordpress.org/trunk@27330 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-content/themes/twentyfourteen/functions.php | 2 +- src/wp-content/themes/twentyfourteen/inc/template-tags.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-content/themes/twentyfourteen/functions.php b/src/wp-content/themes/twentyfourteen/functions.php index 51e1b48e26..41f179a457 100644 --- a/src/wp-content/themes/twentyfourteen/functions.php +++ b/src/wp-content/themes/twentyfourteen/functions.php @@ -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'; } diff --git a/src/wp-content/themes/twentyfourteen/inc/template-tags.php b/src/wp-content/themes/twentyfourteen/inc/template-tags.php index dee499e1e2..c911e2a186 100644 --- a/src/wp-content/themes/twentyfourteen/inc/template-tags.php +++ b/src/wp-content/themes/twentyfourteen/inc/template-tags.php @@ -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; }