Twenty Fifteen: Swap order of description and caption so the caption is underneath an image on image attachment pages.

Props iamtakashi, fixes #30020.



git-svn-id: https://develop.svn.wordpress.org/trunk@29951 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
iandstewart 2014-10-17 21:35:01 +00:00
parent 061226df73
commit 35c3756c2b
2 changed files with 43 additions and 21 deletions

View File

@ -26,6 +26,7 @@ get_header(); ?>
</header><!-- .entry-header --> </header><!-- .entry-header -->
<div class="entry-content"> <div class="entry-content">
<div class="entry-attachment">
<?php <?php
/** /**
* Filter the default Twenty Fifteen image attachment size. * Filter the default Twenty Fifteen image attachment size.
@ -36,8 +37,6 @@ get_header(); ?>
*/ */
$image_size = apply_filters( 'twentyfifteen_attachment_size', 'large' ); $image_size = apply_filters( 'twentyfifteen_attachment_size', 'large' );
echo wp_get_attachment_image( get_the_ID(), $image_size ); echo wp_get_attachment_image( get_the_ID(), $image_size );
the_content();
?> ?>
<?php if ( has_excerpt() ) : ?> <?php if ( has_excerpt() ) : ?>
@ -45,8 +44,10 @@ get_header(); ?>
<?php the_excerpt(); ?> <?php the_excerpt(); ?>
</div><!-- .entry-caption --> </div><!-- .entry-caption -->
<?php endif; ?> <?php endif; ?>
</div><!-- .entry-attachment -->
<?php <?php
the_content();
wp_link_pages( array( wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . esc_html__( 'Pages:', 'twentyfifteen' ) . '</span>', 'before' => '<div class="page-links"><span class="page-links-title">' . esc_html__( 'Pages:', 'twentyfifteen' ) . '</span>',
'after' => '</div>', 'after' => '</div>',

View File

@ -1999,8 +1999,8 @@ a.post-thumbnail:focus {
width: auto; width: auto;
} }
.type-attachment .entry-header { .entry-attachment {
clear: right; margin-bottom: 1.6em;
} }
.type-attachment .entry-title { .type-attachment .entry-title {
@ -2022,6 +2022,7 @@ a.post-thumbnail:focus {
-ms-hyphens: auto; -ms-hyphens: auto;
hyphens: auto; hyphens: auto;
line-height: 1.5; line-height: 1.5;
padding-top: 0.5em;
word-wrap: break-word; word-wrap: break-word;
} }
@ -3161,6 +3162,10 @@ span > video {
margin-bottom: 1.5294em; margin-bottom: 1.5294em;
} }
.entry-attachment {
margin-bottom: 1.6471em;
}
.format-aside .entry-title, .format-aside .entry-title,
.format-image .entry-title, .format-image .entry-title,
.format-video .entry-title, .format-video .entry-title,
@ -3693,6 +3698,10 @@ span > video {
margin-bottom: 1.5789em; margin-bottom: 1.5789em;
} }
.entry-attachment {
margin-bottom: 1.6842em
}
.format-aside .entry-title, .format-aside .entry-title,
.format-image .entry-title, .format-image .entry-title,
.format-video .entry-title, .format-video .entry-title,
@ -4348,6 +4357,10 @@ span > video {
margin-bottom: 1.4667em; margin-bottom: 1.4667em;
} }
.entry-attachment {
margin-bottom: 1.6em;
}
.format-aside .entry-title, .format-aside .entry-title,
.format-image .entry-title, .format-image .entry-title,
.format-video .entry-title, .format-video .entry-title,
@ -4866,6 +4879,10 @@ span > video {
margin-bottom: 1.5294em; margin-bottom: 1.5294em;
} }
.entry-attachment {
margin-bottom: 1.6471em;
}
.format-aside .entry-title, .format-aside .entry-title,
.format-image .entry-title, .format-image .entry-title,
.format-video .entry-title, .format-video .entry-title,
@ -5380,6 +5397,10 @@ span > video {
margin-bottom: 1.5789em; margin-bottom: 1.5789em;
} }
.entry-attachment {
margin-bottom: 1.6842em;
}
.format-aside .entry-title, .format-aside .entry-title,
.format-image .entry-title, .format-image .entry-title,
.format-video .entry-title, .format-video .entry-title,