Make WordPress Core

Changeset 26047


Ignore:
Timestamp:
11/08/2013 05:30:45 AM (10 years ago)
Author:
lancewillett
Message:

Twenty Fourteen: performance win by reducing the number of post thumbnail sizes needed in the theme. Props iamtakashi, closes #25876.

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

Legend:

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

    r25979 r26047  
    1414        if ( has_post_thumbnail() ) :
    1515            if ( 'grid' == get_theme_mod( 'featured_content_layout' ) )
    16                 the_post_thumbnail( 'post-thumbnail-grid' );
     16                the_post_thumbnail( 'post-thumbnail' );
    1717            else
    18                 the_post_thumbnail( 'post-thumbnail-slider' );
     18                the_post_thumbnail( 'post-thumbnail-full-width' );
    1919        endif;
    2020    ?>
     
    2222
    2323    <header class="entry-header">
    24         <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) &&twentyfourteen_categorized_blog() ) : ?>
     24        <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
    2525        <div class="entry-meta">
    2626            <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
  • trunk/src/wp-content/themes/twentyfourteen/functions.php

    r26037 r26047  
    6565    add_theme_support( 'automatic-feed-links' );
    6666
    67     // Enable support for Post Thumbnails.
     67    // Enable support for Post Thumbnails, and declare two sizes.
    6868    add_theme_support( 'post-thumbnails' );
    69 
    70     // Add several sizes for Post Thumbnails.
    71     add_image_size( 'post-thumbnail-slider', 1038, 576, true );
    72     add_image_size( 'post-thumbnail-full-width', 1038, 0 );
    73     add_image_size( 'post-thumbnail-grid', 672, 372, true );
    74     add_image_size( 'post-thumbnail', 672, 0 );
     69    add_image_size( 'post-thumbnail-full-width', 1038, 576, true );
     70    add_image_size( 'post-thumbnail', 672, 372, true );
    7571
    7672    // This theme uses wp_nav_menu() in two locations.
Note: See TracChangeset for help on using the changeset viewer.