Make WordPress Core


Ignore:
Timestamp:
10/17/2014 09:35:01 PM (11 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.

File:
1 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>',
Note: See TracChangeset for help on using the changeset viewer.