Make WordPress Core

Changeset 25856


Ignore:
Timestamp:
10/21/2013 04:34:56 PM (13 years ago)
Author:
lancewillett
Message:

Twenty Fourteen: fix non-image attachment page layout, props iamtakashi. Fixes #25624.

Location:
trunk/src/wp-content/themes/twentyfourteen
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfourteen/functions.php

    r25814 r25856  
    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
    … …  
    126126 */
    127127function twentyfourteen_content_width() {
    128         if ( is_attachment() )
     128        if ( is_attachment() && wp_attachment_is_image() )
    129129                $GLOBALS['content_width'] = 810;
    130130}
  • trunk/src/wp-content/themes/twentyfourteen/inc/template-tags.php

    r25802 r25856  
    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 -->
  • trunk/src/wp-content/themes/twentyfourteen/style.css

    r25854 r25856  
    17331733 */
    17341734
     1735.attachment .content-sidebar {
     1736        display: none;
     1737}
     1738
    17351739.attachment .entry-content {
    17361740        padding-top: 0;
    … …  
    17401744        text-transform: none;
    17411745}
     1746
    17421747.entry-attachment .attachment {
    17431748        margin-bottom: 24px;
    … …  
    29622967        }
    29632968
    2964         .attachment .entry-content .attachment {
     2969        .attachment .entry-attachment .attachment {
    29652970                margin-right: -168px;
    29662971                margin-left: -168px;
Note: See TracChangeset for help on using the changeset viewer.