mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-26 06:04:31 +00:00
Twenty Fourteen: performance win by reducing the number of post thumbnail sizes needed in the theme. Props iamtakashi, closes #25876.
git-svn-id: https://develop.svn.wordpress.org/trunk@26047 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -13,15 +13,15 @@
|
||||
<?php
|
||||
if ( has_post_thumbnail() ) :
|
||||
if ( 'grid' == get_theme_mod( 'featured_content_layout' ) )
|
||||
the_post_thumbnail( 'post-thumbnail-grid' );
|
||||
the_post_thumbnail( 'post-thumbnail' );
|
||||
else
|
||||
the_post_thumbnail( 'post-thumbnail-slider' );
|
||||
the_post_thumbnail( 'post-thumbnail-full-width' );
|
||||
endif;
|
||||
?>
|
||||
</a>
|
||||
|
||||
<header class="entry-header">
|
||||
<?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) &&twentyfourteen_categorized_blog() ) : ?>
|
||||
<?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
|
||||
<div class="entry-meta">
|
||||
<span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
|
||||
</div><!-- .entry-meta -->
|
||||
|
||||
@@ -64,14 +64,10 @@ function twentyfourteen_setup() {
|
||||
// Add RSS feed links to <head> for posts and comments.
|
||||
add_theme_support( 'automatic-feed-links' );
|
||||
|
||||
// Enable support for Post Thumbnails.
|
||||
// Enable support for Post Thumbnails, and declare two sizes.
|
||||
add_theme_support( 'post-thumbnails' );
|
||||
|
||||
// Add several sizes for Post Thumbnails.
|
||||
add_image_size( 'post-thumbnail-slider', 1038, 576, true );
|
||||
add_image_size( 'post-thumbnail-full-width', 1038, 0 );
|
||||
add_image_size( 'post-thumbnail-grid', 672, 372, true );
|
||||
add_image_size( 'post-thumbnail', 672, 0 );
|
||||
add_image_size( 'post-thumbnail-full-width', 1038, 576, true );
|
||||
add_image_size( 'post-thumbnail', 672, 372, true );
|
||||
|
||||
// This theme uses wp_nav_menu() in two locations.
|
||||
register_nav_menus( array(
|
||||
|
||||
Reference in New Issue
Block a user