Make WordPress Core

Ticket #30020: 30020.diff

File 30020.diff, 3.3 KB (added by iamtakashi, 11 years ago)

Swap the order of caption and description on image attachment page.

  • wp-content/themes/twentyfifteen/image.php

     
    2626                                        </header><!-- .entry-header -->
    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                                                        <?php if ( has_excerpt() ) : ?>
     43                                                                <div class="entry-caption">
     44                                                                        <?php the_excerpt(); ?>
     45                                                                </div><!-- .entry-caption -->
     46                                                        <?php endif; ?>
     47                                                </div><!-- .entry-attachment -->
    4248
    43                                                 <?php if ( has_excerpt() ) : ?>
    44                                                         <div class="entry-caption">
    45                                                                 <?php the_excerpt(); ?>
    46                                                         </div><!-- .entry-caption -->
    47                                                 <?php endif; ?>
    48 
    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>',
    5253                                                                'after'       => '</div>',
  • wp-content/themes/twentyfifteen/style.css

     
    19991999        width: auto;
    20002000}
    20012001
    2002 .type-attachment .entry-header {
    2003         clear: right;
     2002.entry-attachment {
     2003        margin-bottom: 1.6em;
    20042004}
    20052005
    20062006.type-attachment .entry-title {
     
    20222022        -ms-hyphens: auto;
    20232023        hyphens: auto;
    20242024        line-height: 1.5;
     2025        padding-top: 0.5em;
    20252026        word-wrap: break-word;
    20262027}
    20272028
     
    31573158                margin-bottom: 1.5294em;
    31583159        }
    31593160
     3161        .entry-attachment {
     3162                margin-bottom: 1.6471em;
     3163        }
     3164
    31603165        .format-aside .entry-title,
    31613166        .format-image .entry-title,
    31623167        .format-video .entry-title,
     
    36893694                margin-bottom: 1.5789em;
    36903695        }
    36913696
     3697        .entry-attachment {
     3698                margin-bottom: 1.6842em
     3699        }
     3700
    36923701        .format-aside .entry-title,
    36933702        .format-image .entry-title,
    36943703        .format-video .entry-title,
     
    43444353                margin-bottom: 1.4667em;
    43454354        }
    43464355
     4356        .entry-attachment {
     4357                margin-bottom: 1.6em;
     4358        }
     4359
    43474360        .format-aside .entry-title,
    43484361        .format-image .entry-title,
    43494362        .format-video .entry-title,
     
    48624875                margin-bottom: 1.5294em;
    48634876        }
    48644877
     4878        .entry-attachment {
     4879                margin-bottom: 1.6471em;
     4880        }
     4881
    48654882        .format-aside .entry-title,
    48664883        .format-image .entry-title,
    48674884        .format-video .entry-title,
     
    53765393                margin-bottom: 1.5789em;
    53775394        }
    53785395
     5396        .entry-attachment {
     5397                margin-bottom: 1.6842em;
     5398        }
     5399
    53795400        .format-aside .entry-title,
    53805401        .format-image .entry-title,
    53815402        .format-video .entry-title,