<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[25971] trunk/src/wp-content/themes/twentyfourteen: Twenty Fourteen: clean up post thumbnail naming.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/25971">25971</a></dd>
<dt>Author</dt> <dd>lancewillett</dd>
<dt>Date</dt> <dd>2013-10-28 17:57:57 +0000 (Mon, 28 Oct 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Twenty Fourteen: clean up post thumbnail naming. Props iamtakashi, fixes <a href="http://core.trac.wordpress.org/ticket/25718">#25718</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpcontentthemestwentyfourteencontentfeaturedpostphp">trunk/src/wp-content/themes/twentyfourteen/content-featured-post.php</a></li>
<li><a href="#trunksrcwpcontentthemestwentyfourteenfunctionsphp">trunk/src/wp-content/themes/twentyfourteen/functions.php</a></li>
<li><a href="#trunksrcwpcontentthemestwentyfourteeninctemplatetagsphp">trunk/src/wp-content/themes/twentyfourteen/inc/template-tags.php</a></li>
<li><a href="#trunksrcwpcontentthemestwentyfourteenrtlcss">trunk/src/wp-content/themes/twentyfourteen/rtl.css</a></li>
<li><a href="#trunksrcwpcontentthemestwentyfourteenstylecss">trunk/src/wp-content/themes/twentyfourteen/style.css</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpcontentthemestwentyfourteencontentfeaturedpostphp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-content/themes/twentyfourteen/content-featured-post.php (25970 => 25971)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-content/themes/twentyfourteen/content-featured-post.php     2013-10-28 17:52:45 UTC (rev 25970)
+++ trunk/src/wp-content/themes/twentyfourteen/content-featured-post.php        2013-10-28 17:57:57 UTC (rev 25971)
</span><span class="lines">@@ -12,7 +12,7 @@
</span><span class="cx">  <a class="attachment-featured-featured" href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>">
</span><span class="cx">          <?php
</span><span class="cx">                  if ( has_post_thumbnail() ) :
</span><del>-                               the_post_thumbnail( 'featured-thumbnail-featured' );
</del><ins>+                                the_post_thumbnail( 'post-thumbnail-grid' );
</ins><span class="cx"> 
</span><span class="cx">                  else :
</span><span class="cx">                          $images = get_children( array(
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> 
</span><span class="cx">                          if ( $images ) :
</span><span class="cx">                                  $image = array_shift( $images );
</span><del>-                                       echo wp_get_attachment_image( $image->ID, 'featured-thumbnail-featured' );
</del><ins>+                                        echo wp_get_attachment_image( $image->ID, 'post-thumbnail-grid' );
</ins><span class="cx">                           endif;
</span><span class="cx">                  endif;
</span><span class="cx">          ?>
</span></span></pre></div>
<a id="trunksrcwpcontentthemestwentyfourteenfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-content/themes/twentyfourteen/functions.php (25970 => 25971)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-content/themes/twentyfourteen/functions.php 2013-10-28 17:52:45 UTC (rev 25970)
+++ trunk/src/wp-content/themes/twentyfourteen/functions.php    2013-10-28 17:57:57 UTC (rev 25971)
</span><span class="lines">@@ -68,9 +68,8 @@
</span><span class="cx">  add_theme_support( 'post-thumbnails' );
</span><span class="cx"> 
</span><span class="cx">  // Add several sizes for Post Thumbnails.
</span><del>-       add_image_size( 'featured-thumbnail-large', 672, 0 );
-       add_image_size( 'featured-thumbnail-featured', 672, 372, true );
-       add_image_size( 'featured-thumbnail-formatted', 306, 0 );
</del><ins>+        add_image_size( 'post-thumbnail-grid', 672, 372, true );
+       add_image_size( 'post-thumbnail', 672, 0 );
</ins><span class="cx"> 
</span><span class="cx">  // This theme uses wp_nav_menu() in two locations.
</span><span class="cx">  register_nav_menus( array(
</span><span class="lines">@@ -361,9 +360,11 @@
</span><span class="cx">  *
</span><span class="cx">  * Adds body classes to denote:
</span><span class="cx">  * 1. Single or multiple authors.
</span><del>- * 2. Index views.
- * 3. Full-width content layout.
- * 4. Presence of footer widgets.
</del><ins>+ * 2. Presense of header image.
+ * 3. Index views.
+ * 4. Full-width content layout.
+ * 5. Presence of footer widgets.
+ * 6. Single views.
</ins><span class="cx">  *
</span><span class="cx">  * @since Twenty Fourteen 1.0
</span><span class="cx">  *
</span><span class="lines">@@ -391,6 +392,9 @@
</span><span class="cx">  if ( is_active_sidebar( 'sidebar-3' ) )
</span><span class="cx">          $classes[] = 'footer-widgets';
</span><span class="cx"> 
</span><ins>+       if ( is_singular() )
+               $classes[] = 'singular';
+
</ins><span class="cx">   return $classes;
</span><span class="cx"> }
</span><span class="cx"> add_filter( 'body_class', 'twentyfourteen_body_classes' );
</span><span class="lines">@@ -399,7 +403,7 @@
</span><span class="cx">  * Extend the default WordPress post classes.
</span><span class="cx">  *
</span><span class="cx">  * Adds a post class to denote:
</span><del>- * Non-password protected page with a featured image.
</del><ins>+ * Non-password protected page with a post thumbnail.
</ins><span class="cx">  *
</span><span class="cx">  * @since Twenty Fourteen 1.0
</span><span class="cx">  *
</span><span class="lines">@@ -408,7 +412,9 @@
</span><span class="cx">  */
</span><span class="cx"> function twentyfourteen_post_classes( $classes ) {
</span><span class="cx">  if ( ! post_password_required() && has_post_thumbnail() )
</span><del>-               $classes[] = 'has-featured-image';
</del><ins>+                $classes[] = 'has-post-thumbnail';
+       else
+               $classes[] = 'no-post-thumbnail';
</ins><span class="cx"> 
</span><span class="cx">  return $classes;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunksrcwpcontentthemestwentyfourteeninctemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-content/themes/twentyfourteen/inc/template-tags.php (25970 => 25971)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-content/themes/twentyfourteen/inc/template-tags.php 2013-10-28 17:52:45 UTC (rev 25970)
+++ trunk/src/wp-content/themes/twentyfourteen/inc/template-tags.php    2013-10-28 17:57:57 UTC (rev 25971)
</span><span class="lines">@@ -159,7 +159,7 @@
</span><span class="cx"> add_action( 'save_post',     'twentyfourteen_category_transient_flusher' );
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Displays an optional featured image, with an anchor element
</del><ins>+ * Displays an optional post thumbnail, with an anchor element
</ins><span class="cx">  * when on index views, and a div element when on a single view.
</span><span class="cx">  *
</span><span class="cx">  * @return void
</span><span class="lines">@@ -171,15 +171,15 @@
</span><span class="cx">  if ( is_singular() ) :
</span><span class="cx">  ?>
</span><span class="cx"> 
</span><del>-       <div class="featured-thumbnail">
-               <?php the_post_thumbnail( 'featured-thumbnail-large' ); ?>
</del><ins>+        <div class="post-thumbnail">
+               <?php the_post_thumbnail( 'post-thumbnail' ); ?>
</ins><span class="cx">   </div>
</span><span class="cx"> 
</span><span class="cx">  <?php else : ?>
</span><span class="cx"> 
</span><del>-       <a class="featured-thumbnail" href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>">
</del><ins>+        <a class="post-thumbnail" href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>">
</ins><span class="cx">   <?php if ( has_post_thumbnail() ) :
</span><del>-               the_post_thumbnail( 'featured-thumbnail-large' );
</del><ins>+                the_post_thumbnail( 'post-thumbnail' );
</ins><span class="cx">   else : ?>
</span><span class="cx">          <p class="screen-reader-text"><?php _e( 'No featured image.', 'twentyfourteen' ); ?></p>
</span><span class="cx">  <?php endif; ?>
</span></span></pre></div>
<a id="trunksrcwpcontentthemestwentyfourteenrtlcss"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-content/themes/twentyfourteen/rtl.css (25970 => 25971)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-content/themes/twentyfourteen/rtl.css       2013-10-28 17:52:45 UTC (rev 25970)
+++ trunk/src/wp-content/themes/twentyfourteen/rtl.css  2013-10-28 17:57:57 UTC (rev 25971)
</span><span class="lines">@@ -361,7 +361,7 @@
</span><span class="cx"> 
</span><span class="cx"> /* Mobile list style */
</span><span class="cx"> @media screen and (max-width: 400px) {
</span><del>-       .list-view .featured-thumbnail img {
</del><ins>+        .list-view .post-thumbnail img {
</ins><span class="cx">           float: right;
</span><span class="cx">          margin: 0 0 3px 10px;
</span><span class="cx">  }
</span></span></pre></div>
<a id="trunksrcwpcontentthemestwentyfourteenstylecss"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-content/themes/twentyfourteen/style.css (25970 => 25971)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-content/themes/twentyfourteen/style.css     2013-10-28 17:52:45 UTC (rev 25970)
+++ trunk/src/wp-content/themes/twentyfourteen/style.css        2013-10-28 17:57:57 UTC (rev 25971)
</span><span class="lines">@@ -35,7 +35,8 @@
</span><span class="cx">  *   6.9 - Contributor Page
</span><span class="cx">  *   6.10 - 404 Page
</span><span class="cx">  *   6.11 - Front Page
</span><del>- *   6.12 - Comments
</del><ins>+ *   6.12 - Full-width
+ *   6.13 - Comments
</ins><span class="cx">  * 7.0 - Sidebar
</span><span class="cx">  *   7.1 - Widgets
</span><span class="cx">  *   7.2 - Content Sidebar Widgets
</span><span class="lines">@@ -561,7 +562,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> .attachment-featured-featured img,
</span><del>-.featured-thumbnail img {
</del><ins>+.post-thumbnail img {
</ins><span class="cx">   height: auto;
</span><span class="cx">  max-width: 100%;
</span><span class="cx"> }
</span><span class="lines">@@ -984,10 +985,6 @@
</span><span class="cx">  max-width: 672px;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.full-width .hentry {
-       max-width: 100%;
-}
-
</del><span class="cx"> .site-content .entry-header,
</span><span class="cx"> .site-content .entry-content,
</span><span class="cx"> .site-content .entry-summary,
</span><span class="lines">@@ -1003,7 +1000,7 @@
</span><span class="cx">  * -----------------------------------------------------------------------------
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>- .featured-thumbnail {
</del><ins>+ .post-thumbnail {
</ins><span class="cx">   background: url(images/pattern-light.svg) #767676 repeat fixed;
</span><span class="cx">  display: none;
</span><span class="cx">  float: none;
</span><span class="lines">@@ -1015,17 +1012,17 @@
</span><span class="cx">  z-index: 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-a.featured-thumbnail:hover {
</del><ins>+a.post-thumbnail:hover {
</ins><span class="cx">   background: url(images/pattern-light.svg) #919191 repeat fixed;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.featured-thumbnail img {
</del><ins>+.post-thumbnail img {
</ins><span class="cx">   display: block;
</span><span class="cx">  margin: 0 auto;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.has-featured-image .featured-thumbnail,
-.format-standard .featured-thumbnail {
</del><ins>+.has-post-thumbnail .post-thumbnail,
+.format-standard .post-thumbnail {
</ins><span class="cx">   display: block;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1045,7 +1042,7 @@
</span><span class="cx">  padding: 0 10px 12px;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.site-content .has-featured-image .entry-header,
</del><ins>+.site-content .has-post-thumbnail .entry-header,
</ins><span class="cx"> .site-content .format-standard .entry-header {
</span><span class="cx">  padding-top: 24px;
</span><span class="cx"> }
</span><span class="lines">@@ -1732,10 +1729,33 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * 6.11 Comments
</del><ins>+ * 6.12 Full-width
</ins><span class="cx">  * -----------------------------------------------------------------------------
</span><span class="cx">  */
</span><span class="cx"> 
</span><ins>+.full-width.singular .content-area {
+       padding-top: 0;
+}
+
+.full-width .hentry {
+       max-width: 100%;
+}
+
+.full-width.singular .hentry.no-post-thumbnail,
+.full-width.singular .hentry.no-post-thumbnail.format-standard.post-password-required {
+       padding-top: 24px;
+}
+
+.full-width.singular .hentry.no-post-thumbnail.format-standard {
+       padding-top: 0;
+}
+
+
+/**
+ * 6.13 Comments
+ * -----------------------------------------------------------------------------
+ */
+
</ins><span class="cx"> .comments-area {
</span><span class="cx">  margin: 48px auto;
</span><span class="cx">  max-width: 474px;
</span><span class="lines">@@ -2519,14 +2539,14 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> @media screen and (max-width: 400px) {
</span><del>-       .list-view .featured-thumbnail {
</del><ins>+        .list-view .post-thumbnail {
</ins><span class="cx">           background: none;
</span><span class="cx">          min-height: 0;
</span><span class="cx">          width: auto;
</span><span class="cx">          z-index: 2;
</span><span class="cx">  }
</span><span class="cx"> 
</span><del>-       .list-view .featured-thumbnail img {
</del><ins>+        .list-view .post-thumbnail img {
</ins><span class="cx">           float: left;
</span><span class="cx">          margin: 0 10px 3px 0;
</span><span class="cx">          width: 84px;
</span><span class="lines">@@ -2589,7 +2609,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> @media screen and (min-width: 401px) {
</span><del>-       a.featured-thumbnail:hover img {
</del><ins>+        a.post-thumbnail:hover img {
</ins><span class="cx">           opacity: 0.85;
</span><span class="cx">  }
</span><span class="cx"> 
</span><span class="lines">@@ -2691,8 +2711,8 @@
</span><span class="cx">          margin: -3px 2px 0 0;
</span><span class="cx">  }
</span><span class="cx"> 
</span><del>-       .list-view .site-content .has-featured-image .featured-thumbnail,
-       .list-view .site-content .format-standard .featured-thumbnail {
</del><ins>+        .list-view .site-content .has-post-thumbnail .post-thumbnail,
+       .list-view .site-content .format-standard .post-thumbnail {
</ins><span class="cx">           margin-top: -49px;
</span><span class="cx">  }
</span><span class="cx"> 
</span><span class="lines">@@ -2714,7 +2734,7 @@
</span><span class="cx">          padding-left: 30px;
</span><span class="cx">  }
</span><span class="cx"> 
</span><del>-       .site-content .has-featured-image .entry-header,
</del><ins>+        .site-content .has-post-thumbnail .entry-header,
</ins><span class="cx">   .site-content .format-standard .entry-header {
</span><span class="cx">          margin-top: -48px;
</span><span class="cx">  }
</span><span class="lines">@@ -2731,6 +2751,10 @@
</span><span class="cx">          width: 100%;
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+       .full-width.singular .content-area {
+               padding-top: 0;
+       }
+
</ins><span class="cx">   .site-content {
</span><span class="cx">          margin-right: 33.33333333%;
</span><span class="cx">  }
</span><span class="lines">@@ -2739,16 +2763,25 @@
</span><span class="cx">          margin-right: 0;
</span><span class="cx">  }
</span><span class="cx"> 
</span><del>-       .site-content .has-featured-image .entry-header,
</del><ins>+        .site-content .has-post-thumbnail .entry-header,
</ins><span class="cx">   .site-content .format-standard .entry-header {
</span><span class="cx">          margin-top: 0;
</span><span class="cx">  }
</span><span class="cx"> 
</span><del>-       .full-width .site-content .has-featured-image .entry-header,
</del><ins>+        .full-width .site-content .has-post-thumbnail .entry-header,
</ins><span class="cx">   .full-width .site-content .format-standard .entry-header {
</span><span class="cx">          margin-top: -48px;
</span><span class="cx">  }
</span><span class="cx"> 
</span><ins>+       .full-width.singular .hentry.no-post-thumbnail,
+       .full-width.singular .hentry.no-post-thumbnail.format-standard.post-password-required {
+               padding-top: 36px;
+       }
+
+       .full-width.singular .hentry.no-post-thumbnail.format-standard {
+               padding-top: 0;
+       }
+
</ins><span class="cx">   .archive-header,
</span><span class="cx">  .comments-area,
</span><span class="cx">  .image-navigation,
</span><span class="lines">@@ -2971,7 +3004,20 @@
</span><span class="cx">          padding-top: 72px;
</span><span class="cx">  }
</span><span class="cx"> 
</span><del>-       .site-content .has-featured-image .entry-header,
</del><ins>+        .full-width.singular .content-area {
+               padding-top: 0;
+       }
+
+       .full-width.singular .hentry.no-post-thumbnail,
+       .full-width.singular .hentry.no-post-thumbnail.format-standard.post-password-required {
+               padding-top: 72px;
+       }
+
+       .full-width.singular .hentry.no-post-thumbnail.format-standard {
+               padding-top: 0;
+       }
+
+       .site-content .has-post-thumbnail .entry-header,
</ins><span class="cx">   .site-content .format-standard .entry-header {
</span><span class="cx">          margin-top: -48px;
</span><span class="cx">  }
</span><span class="lines">@@ -3030,7 +3076,7 @@
</span><span class="cx">          margin-top: 0;
</span><span class="cx">  }
</span><span class="cx"> 
</span><del>-       .site-content .has-featured-image .entry-header,
</del><ins>+        .site-content .has-post-thumbnail .entry-header,
</ins><span class="cx">   .site-content .format-standard .entry-header {
</span><span class="cx">          margin-top: 0;
</span><span class="cx">  }
</span><span class="lines">@@ -3191,7 +3237,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> @media screen and (min-width: 1040px) {
</span><del>-       .site-content .has-featured-image .entry-header,
</del><ins>+        .site-content .has-post-thumbnail .entry-header,
</ins><span class="cx">   .site-content .format-standard .entry-header {
</span><span class="cx">          margin-top: -48px;
</span><span class="cx">  }
</span></span></pre>
</div>
</div>

</body>
</html>