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:
parent
412ea898c0
commit
6df629fb02
|
@ -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';
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue