Twenty Thirteen: avoid orphans in Aside date post meta. Props obenland, fixes #24166.

git-svn-id: https://develop.svn.wordpress.org/trunk@24071 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Lance Willett 2013-04-23 16:57:32 +00:00
parent 37f6f6edd4
commit b051e780e3
4 changed files with 13 additions and 60 deletions

View File

@ -14,17 +14,18 @@
<?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?> <?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?>
</div><!-- .entry-content --> </div><!-- .entry-content -->
<?php if ( is_single() ) : ?>
<footer class="entry-meta"> <footer class="entry-meta">
<?php twentythirteen_entry_meta(); ?> <?php if ( is_single() ) : ?>
<?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?> <?php twentythirteen_entry_meta(); ?>
<?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?>
<?php if ( get_the_author_meta( 'description' ) && is_multi_author() ) : ?> <?php if ( get_the_author_meta( 'description' ) && is_multi_author() ) : ?>
<?php get_template_part( 'author-bio' ); ?> <?php get_template_part( 'author-bio' ); ?>
<?php endif; ?> <?php endif; ?>
<?php else : ?>
<?php twentythirteen_entry_date(); ?>
<?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?>
<?php endif; // is_single() ?>
</footer><!-- .entry-meta --> </footer><!-- .entry-meta -->
<?php else : ?>
<?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer><!-- .entry-meta -->' ); ?>
<?php endif; // is_single() ?>
</article><!-- #post --> </article><!-- #post -->

View File

@ -375,7 +375,7 @@ function twentythirteen_entry_meta() {
if ( is_sticky() && is_home() && ! is_paged() ) if ( is_sticky() && is_home() && ! is_paged() )
echo '<span class="featured-post">' . __( 'Sticky', 'twentythirteen' ) . '</span>'; echo '<span class="featured-post">' . __( 'Sticky', 'twentythirteen' ) . '</span>';
if ( ! has_post_format( 'aside' ) && ! has_post_format( 'link' ) && 'post' == get_post_type() ) if ( ! has_post_format( 'link' ) && 'post' == get_post_type() )
twentythirteen_entry_date(); twentythirteen_entry_date();
// Translators: used between list items, there is a space after the comma. // Translators: used between list items, there is a space after the comma.
@ -528,23 +528,6 @@ function twentythirteen_video_width( $atts ) {
add_action( 'embed_defaults', 'twentythirteen_video_width' ); add_action( 'embed_defaults', 'twentythirteen_video_width' );
add_action( 'shortcode_atts_video', 'twentythirteen_video_width' ); add_action( 'shortcode_atts_video', 'twentythirteen_video_width' );
/**
* Adds entry date to aside posts after the content.
*
*
* @since Twenty Thirteen 1.0
*
* @param string $content Post content.
* @return string Post content.
*/
function twentythirteen_aside_date( $content ) {
if ( ! is_feed() && has_post_format( 'aside' ) ) {
$content .= twentythirteen_entry_date( false );
}
return $content;
}
add_filter( 'the_content', 'twentythirteen_aside_date', 8 ); // After embeds, before everything else.
/** /**
* Switches default core markup for search form to output valid HTML5. * Switches default core markup for search form to output valid HTML5.
* *

View File

@ -323,19 +323,6 @@ div.nav-menu > ul {
* ---------------------------------------------------------------------------- * ----------------------------------------------------------------------------
*/ */
.format-aside .entry-content .date {
margin-left: auto;
margin-right: 20px;
}
.format-aside .entry-content .date a:before {
content: normal;
}
.format-aside .entry-content .date a:after {
content: "\f303";
}
.format-aside cite:before { .format-aside cite:before {
content: normal; content: normal;
margin-right: auto; margin-right: auto;

View File

@ -1437,21 +1437,7 @@ footer.entry-meta {
box-shadow: inset 0 2px 2px rgba(173, 165, 105, 0.2); box-shadow: inset 0 2px 2px rgba(173, 165, 105, 0.2);
} }
.format-aside .entry-content .date { .format-aside .entry-meta {
color: #ca3c08;
font-size: 14px;
margin-left: 20px;
}
.format-aside .entry-content .date a:hover {
color: #ea9629;
}
.format-aside .entry-content .date a:before {
content: "\f303";
}
.format-aside footer.entry-meta {
margin-top: 0; margin-top: 0;
} }
@ -1470,10 +1456,6 @@ footer.entry-meta {
margin-right: 5px; margin-right: 5px;
} }
.blog .format-aside .entry-content p:last-child {
margin-bottom: 0;
}
/* Audio */ /* Audio */
.format-audio { .format-audio {
background-color: #db572f; background-color: #db572f;