WordPress.org

Make WordPress Core

Changeset 24071


Ignore:
Timestamp:
04/23/2013 04:57:32 PM (5 years ago)
Author:
lancewillett
Message:

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

Location:
trunk/wp-content/themes/twentythirteen
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentythirteen/content-aside.php

    r23680 r24071  
    1515    </div><!-- .entry-content -->
    1616
    17     <?php if ( is_single() ) : ?>
    1817    <footer class="entry-meta">
    19         <?php twentythirteen_entry_meta(); ?>
    20         <?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?>
     18        <?php if ( is_single() ) : ?>
     19            <?php twentythirteen_entry_meta(); ?>
     20            <?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?>
    2121
    22         <?php if ( get_the_author_meta( 'description' ) && is_multi_author() ) : ?>
    23             <?php get_template_part( 'author-bio' ); ?>
    24         <?php endif; ?>
     22            <?php if ( get_the_author_meta( 'description' ) && is_multi_author() ) : ?>
     23                <?php get_template_part( 'author-bio' ); ?>
     24            <?php endif; ?>
     25
     26        <?php else : ?>
     27            <?php twentythirteen_entry_date(); ?>
     28            <?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?>
     29        <?php endif; // is_single() ?>
    2530    </footer><!-- .entry-meta -->
    26 
    27     <?php else : ?>
    28         <?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer><!-- .entry-meta -->' ); ?>
    29     <?php endif; // is_single() ?>
    3031</article><!-- #post -->
  • trunk/wp-content/themes/twentythirteen/functions.php

    r24070 r24071  
    376376        echo '<span class="featured-post">' . __( 'Sticky', 'twentythirteen' ) . '</span>';
    377377
    378     if ( ! has_post_format( 'aside' ) && ! has_post_format( 'link' ) && 'post' == get_post_type() )
     378    if ( ! has_post_format( 'link' ) && 'post' == get_post_type() )
    379379        twentythirteen_entry_date();
    380380
     
    530530
    531531/**
    532  * Adds entry date to aside posts after the content.
    533  *
    534  *
    535  * @since Twenty Thirteen 1.0
    536  *
    537  * @param string $content Post content.
    538  * @return string Post content.
    539  */
    540 function twentythirteen_aside_date( $content ) {
    541     if ( ! is_feed() && has_post_format( 'aside' ) ) {
    542         $content .= twentythirteen_entry_date( false );
    543     }
    544     return $content;
    545 }
    546 add_filter( 'the_content', 'twentythirteen_aside_date', 8 ); // After embeds, before everything else.
    547 
    548 /**
    549532 * Switches default core markup for search form to output valid HTML5.
    550533 *
  • trunk/wp-content/themes/twentythirteen/rtl.css

    r24035 r24071  
    324324 */
    325325
    326 .format-aside .entry-content .date {
    327     margin-left: auto;
    328     margin-right: 20px;
    329 }
    330 
    331 .format-aside .entry-content .date a:before {
    332     content: normal;
    333 }
    334 
    335 .format-aside .entry-content .date a:after {
    336     content: "\f303";
    337 }
    338 
    339326.format-aside cite:before {
    340327    content: normal;
  • trunk/wp-content/themes/twentythirteen/style.css

    r24036 r24071  
    14381438}
    14391439
    1440 .format-aside .entry-content .date {
    1441     color: #ca3c08;
    1442     font-size: 14px;
    1443     margin-left: 20px;
    1444 }
    1445 
    1446 .format-aside .entry-content .date a:hover {
    1447     color: #ea9629;
    1448 }
    1449 
    1450 .format-aside .entry-content .date a:before {
    1451     content: "\f303";
    1452 }
    1453 
    1454 .format-aside footer.entry-meta {
     1440.format-aside .entry-meta {
    14551441    margin-top: 0;
    14561442}
     
    14691455    content: "\2014";
    14701456    margin-right: 5px;
    1471 }
    1472 
    1473 .blog .format-aside .entry-content p:last-child {
    1474     margin-bottom: 0;
    14751457}
    14761458
Note: See TracChangeset for help on using the changeset viewer.