Make WordPress Core

Ticket #25624: 25624.diff

File 25624.diff, 2.4 KB (added by iamtakashi, 13 years ago)
  • wp-content/themes/twentyfourteen/functions.php

     
    118118add_action( 'after_setup_theme', 'twentyfourteen_setup' );
    119119
    120120/**
    121  * Adjust content_width value for full-width and attachment templates.
     121 * Adjust content_width value for image attachment template.
    122122 *
    123123 * @since Twenty Fourteen 1.0
    124124 *
    125125 * @return void
    126126 */
    127127function twentyfourteen_content_width() {
    128         if ( is_attachment() )
     128        if ( is_attachment() && wp_attachment_is_image() )
    129129                $GLOBALS['content_width'] = 810;
    130130}
    131131add_action( 'template_redirect', 'twentyfourteen_content_width' );
  • wp-content/themes/twentyfourteen/inc/template-tags.php

     
    8080                <h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentyfourteen' ); ?></h1>
    8181                <div class="nav-links">
    8282                        <?php
     83                        if ( is_attachment() ) :
     84                                previous_post_link( '%link', __( '<span class="meta-nav">Published In</span>%title', 'twentyfourteen' ) );
     85                        else :
    8386                                previous_post_link( '%link', __( '<span class="meta-nav">Previous Post</span>%title', 'twentyfourteen' ) );
    8487                                next_post_link( '%link', __( '<span class="meta-nav">Next Post</span>%title', 'twentyfourteen' ) );
     88                        endif;
    8589                        ?>
    8690                </div><!-- .nav-links -->
    8791        </nav><!-- .navigation -->
  • wp-content/themes/twentyfourteen/style.css

     
    17321732 * -----------------------------------------------------------------------------
    17331733 */
    17341734
     1735.attachment .content-sidebar {
     1736        display: none;
     1737}
     1738
    17351739.attachment .entry-content {
    17361740        padding-top: 0;
    17371741}
     
    17391743.attachment footer.entry-meta {
    17401744        text-transform: none;
    17411745}
     1746
    17421747.entry-attachment .attachment {
    17431748        margin-bottom: 24px;
    17441749}
     
    29502955                margin-right: -168px;
    29512956        }
    29522957
    2953         .attachment .entry-content .attachment {
     2958        .attachment .entry-attachment .attachment {
    29542959                margin-right: -168px;
    29552960                margin-left: -168px;
    29562961                max-width: 810px;