Make WordPress Core

Changeset 29951


Ignore:
Timestamp:
10/17/2014 09:35:01 PM (12 years ago)
Author:
iandstewart
Message:

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

Props iamtakashi, fixes #30020.

Location:
trunk/src/wp-content/themes/twentyfifteen
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfifteen/image.php

    r29892 r29951  
    2727
    2828                                        <div class="entry-content">
    29                                                 <?php
    30                                                         /**
    31                                                          * Filter the default Twenty Fifteen image attachment size.
    32                                                          *
    33                                                          * @since Twenty Fifteen 1.0
    34                                                          *
    35                                                          * @param string $image_size Image size. Default 'large'.
    36                                                          */
    37                                                         $image_size = apply_filters( 'twentyfifteen_attachment_size', 'large' );
    38                                                         echo wp_get_attachment_image( get_the_ID(), $image_size );
     29                                                <div class="entry-attachment">
     30                                                        <?php
     31                                                                /**
     32                                                                 * Filter the default Twenty Fifteen image attachment size.
     33                                                                 *
     34                                                                 * @since Twenty Fifteen 1.0
     35                                                                 *
     36                                                                 * @param string $image_size Image size. Default 'large'.
     37                                                                 */
     38                                                                $image_size = apply_filters( 'twentyfifteen_attachment_size', 'large' );
     39                                                                echo wp_get_attachment_image( get_the_ID(), $image_size );
     40                                                        ?>
    3941
    40                                                         the_content();
    41                                                 ?>
    42 
    43                                                 <?php if ( has_excerpt() ) : ?>
    44                                                         <div class="entry-caption">
    45                                                                 <?php the_excerpt(); ?>
    46                                                         </div><!-- .entry-caption -->
    47                                                 <?php endif; ?>
     42                                                        <?php if ( has_excerpt() ) : ?>
     43                                                                <div class="entry-caption">
     44                                                                        <?php the_excerpt(); ?>
     45                                                                </div><!-- .entry-caption -->
     46                                                        <?php endif; ?>
     47                                                </div><!-- .entry-attachment -->
    4848
    4949                                                <?php
     50                                                        the_content();
    5051                                                        wp_link_pages( array(
    5152                                                                'before'      => '<div class="page-links"><span class="page-links-title">' . esc_html__( 'Pages:', 'twentyfifteen' ) . '</span>',
  • trunk/src/wp-content/themes/twentyfifteen/style.css

    r29949 r29951  
    20002000}
    20012001
    2002 .type-attachment .entry-header {
    2003         clear: right;
     2002.entry-attachment {
     2003        margin-bottom: 1.6em;
    20042004}
    20052005
    … …  
    20232023        hyphens: auto;
    20242024        line-height: 1.5;
     2025        padding-top: 0.5em;
    20252026        word-wrap: break-word;
    20262027}
    … …  
    31623163        }
    31633164
     3165        .entry-attachment {
     3166                margin-bottom: 1.6471em;
     3167        }
     3168
    31643169        .format-aside .entry-title,
    31653170        .format-image .entry-title,
    … …  
    36943699        }
    36953700
     3701        .entry-attachment {
     3702                margin-bottom: 1.6842em
     3703        }
     3704
    36963705        .format-aside .entry-title,
    36973706        .format-image .entry-title,
    … …  
    43494358        }
    43504359
     4360        .entry-attachment {
     4361                margin-bottom: 1.6em;
     4362        }
     4363
    43514364        .format-aside .entry-title,
    43524365        .format-image .entry-title,
    … …  
    48674880        }
    48684881
     4882        .entry-attachment {
     4883                margin-bottom: 1.6471em;
     4884        }
     4885
    48694886        .format-aside .entry-title,
    48704887        .format-image .entry-title,
    … …  
    53795396        .page-links {
    53805397                margin-bottom: 1.5789em;
     5398        }
     5399
     5400        .entry-attachment {
     5401                margin-bottom: 1.6842em;
    53815402        }
    53825403
Note: See TracChangeset for help on using the changeset viewer.