From c8cfe17a027241b34262b8ef2a62449fd0fa3022 Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Thu, 14 Nov 2013 04:50:11 +0000 Subject: [PATCH] Twenty Fourteen: simplify and prefix post thumbnail sizes, props obenland. See #25946. Built from https://develop.svn.wordpress.org/trunk@26152 git-svn-id: http://core.svn.wordpress.org/trunk@26063 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../themes/twentyfourteen/content-featured-post.php | 4 ++-- wp-content/themes/twentyfourteen/functions.php | 4 ++-- wp-content/themes/twentyfourteen/inc/template-tags.php | 8 ++++---- wp-content/themes/twentyfourteen/inc/widgets.php | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/wp-content/themes/twentyfourteen/content-featured-post.php b/wp-content/themes/twentyfourteen/content-featured-post.php index 34747dcc74..b838b33208 100644 --- a/wp-content/themes/twentyfourteen/content-featured-post.php +++ b/wp-content/themes/twentyfourteen/content-featured-post.php @@ -13,9 +13,9 @@ diff --git a/wp-content/themes/twentyfourteen/functions.php b/wp-content/themes/twentyfourteen/functions.php index d485918d80..50efd1b264 100644 --- a/wp-content/themes/twentyfourteen/functions.php +++ b/wp-content/themes/twentyfourteen/functions.php @@ -66,8 +66,8 @@ function twentyfourteen_setup() { // Enable support for Post Thumbnails, and declare two sizes. add_theme_support( 'post-thumbnails' ); - add_image_size( 'post-thumbnail-full-width', 1038, 576, true ); - add_image_size( 'post-thumbnail', 672, 372, true ); + set_post_thumbnail_size( 672, 372, true ); + add_image_size( 'twentyfourteen-full-width', 1038, 576, true ); // This theme uses wp_nav_menu() in two locations. register_nav_menus( array( diff --git a/wp-content/themes/twentyfourteen/inc/template-tags.php b/wp-content/themes/twentyfourteen/inc/template-tags.php index e93b927dab..ed9c017770 100644 --- a/wp-content/themes/twentyfourteen/inc/template-tags.php +++ b/wp-content/themes/twentyfourteen/inc/template-tags.php @@ -174,9 +174,9 @@ function twentyfourteen_post_thumbnail() {
@@ -185,9 +185,9 @@ function twentyfourteen_post_thumbnail() { diff --git a/wp-content/themes/twentyfourteen/inc/widgets.php b/wp-content/themes/twentyfourteen/inc/widgets.php index 49be068b3b..73c95ffb57 100644 --- a/wp-content/themes/twentyfourteen/inc/widgets.php +++ b/wp-content/themes/twentyfourteen/inc/widgets.php @@ -158,7 +158,7 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget { $total_images = count( $images ); if ( has_post_thumbnail() ) : - $post_thumbnail = get_the_post_thumbnail( get_the_ID(), 'post-thumbnail' ); + $post_thumbnail = get_the_post_thumbnail(); elseif ( $total_images > 0 ) : $image = array_shift( $images ); $post_thumbnail = wp_get_attachment_image( $image, 'post-thumbnail' );