Make WordPress Core

Changeset 26152


Ignore:
Timestamp:
11/14/2013 04:49:19 AM (13 years ago)
Author:
lancewillett
Message:

Twenty Fourteen: simplify and prefix post thumbnail sizes, props obenland. See #25946.

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

Legend:

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

    r26047 r26152  
    1414                if ( has_post_thumbnail() ) :
    1515                        if ( 'grid' == get_theme_mod( 'featured_content_layout' ) )
    16                                 the_post_thumbnail( 'post-thumbnail' );
     16                                the_post_thumbnail();
    1717                        else
    18                                 the_post_thumbnail( 'post-thumbnail-full-width' );
     18                                the_post_thumbnail( 'twentyfourteen-full-width' );
    1919                endif;
    2020        ?>
  • trunk/src/wp-content/themes/twentyfourteen/functions.php

    r26151 r26152  
    6767        // Enable support for Post Thumbnails, and declare two sizes.
    6868        add_theme_support( 'post-thumbnails' );
    69         add_image_size( 'post-thumbnail-full-width', 1038, 576, true );
    70         add_image_size( 'post-thumbnail', 672, 372, true );
     69        set_post_thumbnail_size( 672, 372, true );
     70        add_image_size( 'twentyfourteen-full-width', 1038, 576, true );
    7171
    7272        // This theme uses wp_nav_menu() in two locations.
  • trunk/src/wp-content/themes/twentyfourteen/inc/template-tags.php

    r26105 r26152  
    175175        <?php
    176176                if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) && ! wp_is_mobile() )
    177                         the_post_thumbnail( 'post-thumbnail-full-width' );
     177                        the_post_thumbnail( 'twentyfourteen-full-width' );
    178178                else
    179                         the_post_thumbnail( 'post-thumbnail' );
     179                        the_post_thumbnail();
    180180        ?>
    181181        </div>
     
    186186        <?php
    187187                if ( ( ! is_active_sidebar( 'sidebar-2' ) || is_page_template( 'page-templates/full-width.php' ) ) && ! wp_is_mobile() )
    188                         the_post_thumbnail( 'post-thumbnail-full-width' );
     188                        the_post_thumbnail( 'twentyfourteen-full-width' );
    189189                else
    190                         the_post_thumbnail( 'post-thumbnail' );
     190                        the_post_thumbnail();
    191191        ?>
    192192        </a>
  • trunk/src/wp-content/themes/twentyfourteen/inc/widgets.php

    r26020 r26152  
    159159
    160160                                                                        if ( has_post_thumbnail() ) :
    161                                                                                 $post_thumbnail = get_the_post_thumbnail( get_the_ID(), 'post-thumbnail' );
     161                                                                                $post_thumbnail = get_the_post_thumbnail();
    162162                                                                        elseif ( $total_images > 0 ) :
    163163                                                                                $image          = array_shift( $images );
Note: See TracChangeset for help on using the changeset viewer.