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:
parent
6def67ad04
commit
0b139765c1
@ -461,7 +461,7 @@ add_filter( 'body_class', 'twentyfourteen_body_classes' );
|
|||||||
* @return array The filtered post class list.
|
* @return array The filtered post class list.
|
||||||
*/
|
*/
|
||||||
function twentyfourteen_post_classes( $classes ) {
|
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';
|
$classes[] = 'has-post-thumbnail';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ add_action( 'save_post', 'twentyfourteen_category_transient_flusher' );
|
|||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function twentyfourteen_post_thumbnail() {
|
function twentyfourteen_post_thumbnail() {
|
||||||
if ( post_password_required() || ! has_post_thumbnail() ) {
|
if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user