<!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>[45581] trunk/src/wp-content/themes: Coding Standards: Fix the `Squiz.PHP.DisallowMultipleAssignments` violations in the default themes.</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 { white-space: pre-line; 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" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/45581">45581</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/45581","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>pento</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2019-07-01 08:22:31 +0000 (Mon, 01 Jul 2019)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Coding Standards: Fix the `Squiz.PHP.DisallowMultipleAssignments` violations in the default themes.

See <a href="https://core.trac.wordpress.org/ticket/47632">#47632</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpcontentthemestwentyelevenheaderphp">trunk/src/wp-content/themes/twentyeleven/header.php</a></li>
<li><a href="#trunksrcwpcontentthemestwentyelevenincthemeoptionsphp">trunk/src/wp-content/themes/twentyeleven/inc/theme-options.php</a></li>
<li><a href="#trunksrcwpcontentthemestwentyelevenincwidgetsphp">trunk/src/wp-content/themes/twentyeleven/inc/widgets.php</a></li>
<li><a href="#trunksrcwpcontentthemestwentyfifteeninctemplatetagsphp">trunk/src/wp-content/themes/twentyfifteen/inc/template-tags.php</a></li>
<li><a href="#trunksrcwpcontentthemestwentyfourteeninctemplatetagsphp">trunk/src/wp-content/themes/twentyfourteen/inc/template-tags.php</a></li>
<li><a href="#trunksrcwpcontentthemestwentysixteeninctemplatetagsphp">trunk/src/wp-content/themes/twentysixteen/inc/template-tags.php</a></li>
<li><a href="#trunksrcwpcontentthemestwentytenheaderphp">trunk/src/wp-content/themes/twentyten/header.php</a></li>
<li><a href="#trunksrcwpcontentthemestwentytenloopphp">trunk/src/wp-content/themes/twentyten/loop.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpcontentthemestwentyelevenheaderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-content/themes/twentyeleven/header.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-content/themes/twentyeleven/header.php       2019-07-01 08:00:12 UTC (rev 45580)
+++ trunk/src/wp-content/themes/twentyeleven/header.php 2019-07-01 08:22:31 UTC (rev 45581)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -102,12 +102,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                 * The header image.
</span><span class="cx" style="display: block; padding: 0 10px">                                 * Check if this is a post or page, if it has a thumbnail, and if it's a big one
</span><span class="cx" style="display: block; padding: 0 10px">                                 */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                if ( is_singular() && has_post_thumbnail( $post->ID ) &&
-                                               ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) ) ) &&
-                                               $image[1] >= $header_image_width ) :
-                                       // Houston, we have a new header image!
-                                       echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
-                               else :
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         if ( is_singular() && has_post_thumbnail( $post->ID ) ) {
+                                       $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) );
+                                       if ( $image && $image[1] >= $header_image_width ) {
+                                               // Houston, we have a new header image!
+                                               echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
+                                       }
+                               } else {
</ins><span class="cx" style="display: block; padding: 0 10px">                                         // Compatibility with versions of WordPress prior to 3.4.
</span><span class="cx" style="display: block; padding: 0 10px">                                        if ( function_exists( 'get_custom_header' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                                                $header_image_width  = get_custom_header()->width;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -118,7 +119,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                        }
</span><span class="cx" style="display: block; padding: 0 10px">                                        ?>
</span><span class="cx" style="display: block; padding: 0 10px">                                        <img src="<?php header_image(); ?>" width="<?php echo esc_attr( $header_image_width ); ?>" height="<?php echo esc_attr( $header_image_height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" />
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                <?php endif; // end check for featured image or standard header ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 <?php
+                               } // end check for featured image or standard header
+                               ?>
</ins><span class="cx" style="display: block; padding: 0 10px">                         </a>
</span><span class="cx" style="display: block; padding: 0 10px">                        <?php endif; // end check for removed header image ?>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunksrcwpcontentthemestwentyelevenincthemeoptionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-content/themes/twentyeleven/inc/theme-options.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-content/themes/twentyeleven/inc/theme-options.php    2019-07-01 08:00:12 UTC (rev 45580)
+++ trunk/src/wp-content/themes/twentyeleven/inc/theme-options.php      2019-07-01 08:22:31 UTC (rev 45581)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -365,7 +365,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">  * @param array $input An array of form input.
</span><span class="cx" style="display: block; padding: 0 10px">  */
</span><span class="cx" style="display: block; padding: 0 10px"> function twentyeleven_theme_options_validate( $input ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        $output = $defaults = twentyeleven_get_default_theme_options();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $defaults = twentyeleven_get_default_theme_options();
+       $output   = $defaults;
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        // Color scheme must be in our array of color scheme options
</span><span class="cx" style="display: block; padding: 0 10px">        if ( isset( $input['color_scheme'] ) && array_key_exists( $input['color_scheme'], twentyeleven_color_schemes() ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -373,7 +374,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        // Our defaults for the link color may have changed, based on the color scheme.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        $output['link_color'] = $defaults['link_color'] = twentyeleven_get_default_link_color( $output['color_scheme'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $defaults['link_color'] = twentyeleven_get_default_link_color( $output['color_scheme'] );
+       $output['link_color']   = $defaults['link_color'];
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        // Link color must be 3 or 6 hexadecimal characters
</span><span class="cx" style="display: block; padding: 0 10px">        if ( isset( $input['link_color'] ) && preg_match( '/^#?([a-f0-9]{3}){1,2}$/i', $input['link_color'] ) ) {
</span></span></pre></div>
<a id="trunksrcwpcontentthemestwentyelevenincwidgetsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-content/themes/twentyeleven/inc/widgets.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-content/themes/twentyeleven/inc/widgets.php  2019-07-01 08:00:12 UTC (rev 45580)
+++ trunk/src/wp-content/themes/twentyeleven/inc/widgets.php    2019-07-01 08:22:31 UTC (rev 45581)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -76,7 +76,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        $instance['number'] = '10';
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                if ( ! $args['number'] = absint( $instance['number'] ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $args['number'] = absint( $instance['number'] );
+               if ( ! $args['number'] ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                         $args['number'] = 10;
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunksrcwpcontentthemestwentyfifteeninctemplatetagsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-content/themes/twentyfifteen/inc/template-tags.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-content/themes/twentyfifteen/inc/template-tags.php   2019-07-01 08:00:12 UTC (rev 45580)
+++ trunk/src/wp-content/themes/twentyfifteen/inc/template-tags.php     2019-07-01 08:22:31 UTC (rev 45581)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -23,13 +23,15 @@
</span><span class="cx" style="display: block; padding: 0 10px">                <h2 class="screen-reader-text"><?php _e( 'Comment navigation', 'twentyfifteen' ); ?></h2>
</span><span class="cx" style="display: block; padding: 0 10px">                <div class="nav-links">
</span><span class="cx" style="display: block; padding: 0 10px">                        <?php
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        if ( $prev_link = get_previous_comments_link( __( 'Older Comments', 'twentyfifteen' ) ) ) :
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $prev_link = get_previous_comments_link( __( 'Older Comments', 'twentyfifteen' ) );
+                       if ( $prev_link ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                                 printf( '<div class="nav-previous">%s</div>', $prev_link );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                endif;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 }
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        if ( $next_link = get_next_comments_link( __( 'Newer Comments', 'twentyfifteen' ) ) ) :
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $next_link = get_next_comments_link( __( 'Newer Comments', 'twentyfifteen' ) );
+                       if ( $next_link ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                                 printf( '<div class="nav-next">%s</div>', $next_link );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                endif;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 }
</ins><span class="cx" style="display: block; padding: 0 10px">                         ?>
</span><span class="cx" style="display: block; padding: 0 10px">                        </div><!-- .nav-links -->
</span><span class="cx" style="display: block; padding: 0 10px">                </nav><!-- .comment-navigation -->
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -141,7 +143,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">  * @return bool True of there is more than one category, false otherwise.
</span><span class="cx" style="display: block; padding: 0 10px">  */
</span><span class="cx" style="display: block; padding: 0 10px"> function twentyfifteen_categorized_blog() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        if ( false === ( $all_the_cool_cats = get_transient( 'twentyfifteen_categories' ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $all_the_cool_cats = get_transient( 'twentyfifteen_categories' );
+       if ( false === $all_the_cool_cats ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                 // Create an array of all the categories that are attached to posts.
</span><span class="cx" style="display: block; padding: 0 10px">                $all_the_cool_cats = get_categories(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span></span></pre></div>
<a id="trunksrcwpcontentthemestwentyfourteeninctemplatetagsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-content/themes/twentyfourteen/inc/template-tags.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-content/themes/twentyfourteen/inc/template-tags.php  2019-07-01 08:00:12 UTC (rev 45580)
+++ trunk/src/wp-content/themes/twentyfourteen/inc/template-tags.php    2019-07-01 08:22:31 UTC (rev 45581)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -131,7 +131,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">  * @return boolean true if blog has more than 1 category
</span><span class="cx" style="display: block; padding: 0 10px">  */
</span><span class="cx" style="display: block; padding: 0 10px"> function twentyfourteen_categorized_blog() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        if ( false === ( $all_the_cool_cats = get_transient( 'twentyfourteen_category_count' ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $all_the_cool_cats = get_transient( 'twentyfourteen_category_count' );
+       if ( false === $all_the_cool_cats ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                 // Create an array of all the categories that are attached to posts
</span><span class="cx" style="display: block; padding: 0 10px">                $all_the_cool_cats = get_categories(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span></span></pre></div>
<a id="trunksrcwpcontentthemestwentysixteeninctemplatetagsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-content/themes/twentysixteen/inc/template-tags.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-content/themes/twentysixteen/inc/template-tags.php   2019-07-01 08:00:12 UTC (rev 45580)
+++ trunk/src/wp-content/themes/twentysixteen/inc/template-tags.php     2019-07-01 08:22:31 UTC (rev 45581)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -209,7 +209,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @return bool True if there is more than one category, false otherwise.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function twentysixteen_categorized_blog() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                if ( false === ( $all_the_cool_cats = get_transient( 'twentysixteen_categories' ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $all_the_cool_cats = get_transient( 'twentysixteen_categories' );
+               if ( false === $all_the_cool_cats ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                         // Create an array of all the categories that are attached to posts.
</span><span class="cx" style="display: block; padding: 0 10px">                        $all_the_cool_cats = get_categories(
</span><span class="cx" style="display: block; padding: 0 10px">                                array(
</span></span></pre></div>
<a id="trunksrcwpcontentthemestwentytenheaderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-content/themes/twentyten/header.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-content/themes/twentyten/header.php  2019-07-01 08:00:12 UTC (rev 45580)
+++ trunk/src/wp-content/themes/twentyten/header.php    2019-07-01 08:22:31 UTC (rev 45581)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -85,25 +85,27 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                        $header_image_width = HEADER_IMAGE_WIDTH;
</span><span class="cx" style="display: block; padding: 0 10px">                                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        // Check if this is a post or page, if it has a thumbnail, and if it's a big one
-                               if ( is_singular() && current_theme_supports( 'post-thumbnails' ) &&
-                                                       has_post_thumbnail( $post->ID ) &&
-                                                       ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
-                                                       $image[1] >= $header_image_width ) :
-                                       // Houston, we have a new header image!
-                                       echo get_the_post_thumbnail( $post->ID );
-                                       elseif ( get_header_image() ) :
-                                               // Compatibility with versions of WordPress prior to 3.4.
-                                               if ( function_exists( 'get_custom_header' ) ) {
-                                                       $header_image_width  = get_custom_header()->width;
-                                                       $header_image_height = get_custom_header()->height;
-                                               } else {
-                                                       $header_image_width  = HEADER_IMAGE_WIDTH;
-                                                       $header_image_height = HEADER_IMAGE_HEIGHT;
-                                               }
-                                               ?>
-                                               <img src="<?php header_image(); ?>" width="<?php echo esc_attr( $header_image_width ); ?>" height="<?php echo esc_attr( $header_image_height ); ?>" alt="" />
-                                       <?php endif; ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         // Check if this is a post or page, if it has a thumbnail, and if it's a big one
+                               if ( is_singular() && has_post_thumbnail( $post->ID ) ) {
+                                       $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) );
+                                       if ( $image && $image[1] >= $header_image_width ) {
+                                               // Houston, we have a new header image!
+                                               echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
+                                       }
+                               } else {
+                                       // Compatibility with versions of WordPress prior to 3.4.
+                                       if ( function_exists( 'get_custom_header' ) ) {
+                                               $header_image_width  = get_custom_header()->width;
+                                               $header_image_height = get_custom_header()->height;
+                                       } else {
+                                               $header_image_width  = HEADER_IMAGE_WIDTH;
+                                               $header_image_height = HEADER_IMAGE_HEIGHT;
+                                       }
+                                       ?>
+                                       <img src="<?php header_image(); ?>" width="<?php echo esc_attr( $header_image_width ); ?>" height="<?php echo esc_attr( $header_image_height ); ?>" alt="" />
+                                       <?php
+                               } // end check for featured image or standard header
+                               ?>
</ins><span class="cx" style="display: block; padding: 0 10px">                         </div><!-- #branding -->
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        <div id="access" role="navigation">
</span></span></pre></div>
<a id="trunksrcwpcontentthemestwentytenloopphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-content/themes/twentyten/loop.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-content/themes/twentyten/loop.php    2019-07-01 08:00:12 UTC (rev 45580)
+++ trunk/src/wp-content/themes/twentyten/loop.php      2019-07-01 08:22:31 UTC (rev 45581)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -98,10 +98,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        </div><!-- .entry-content -->
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        <div class="entry-utility">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        <?php if ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) : ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 <?php
+                       $gallery = get_term_by( 'slug', _x( 'gallery', 'gallery category slug', 'twentyten' ), 'category' );
+                       if ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) :
+                               ?>
</ins><span class="cx" style="display: block; padding: 0 10px">                                 <a href="<?php echo esc_url( get_post_format_link( 'gallery' ) ); ?>" title="<?php esc_attr_e( 'View Galleries', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a>
</span><span class="cx" style="display: block; padding: 0 10px">                                <span class="meta-sep">|</span>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        <?php elseif ( $gallery = get_term_by( 'slug', _x( 'gallery', 'gallery category slug', 'twentyten' ), 'category' ) && in_category( $gallery->term_id ) ) : ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 <?php elseif ( $gallery && in_category( $gallery->term_id ) ) : ?>
</ins><span class="cx" style="display: block; padding: 0 10px">                                 <a href="<?php echo esc_url( get_category_link( $gallery ) ); ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a>
</span><span class="cx" style="display: block; padding: 0 10px">                                <span class="meta-sep">|</span>
</span><span class="cx" style="display: block; padding: 0 10px">                        <?php endif; ?>
</span></span></pre>
</div>
</div>

</body>
</html>