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
This commit is contained in:
Scott Taylor 2014-02-28 21:56:23 +00:00
parent 6def67ad04
commit 0b139765c1
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;
}