<!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" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { 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 #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#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>
<title>[14708] trunk/wp-content/themes/twentyten: In Twenty Ten,
documentation and code improvements.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/14708">14708</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2010-05-17 06:36:11 +0000 (Mon, 17 May 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>In Twenty Ten, documentation and code improvements. see <a href="http://trac.wordpress.org/ticket/12695">#12695</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpcontentthemestwentyten404php">trunk/wp-content/themes/twentyten/404.php</a></li>
<li><a href="#trunkwpcontentthemestwentytenarchivephp">trunk/wp-content/themes/twentyten/archive.php</a></li>
<li><a href="#trunkwpcontentthemestwentytenattachmentphp">trunk/wp-content/themes/twentyten/attachment.php</a></li>
<li><a href="#trunkwpcontentthemestwentytenauthorphp">trunk/wp-content/themes/twentyten/author.php</a></li>
<li><a href="#trunkwpcontentthemestwentytencategoryphp">trunk/wp-content/themes/twentyten/category.php</a></li>
<li><a href="#trunkwpcontentthemestwentytencommentsphp">trunk/wp-content/themes/twentyten/comments.php</a></li>
<li><a href="#trunkwpcontentthemestwentytenfooterphp">trunk/wp-content/themes/twentyten/footer.php</a></li>
<li><a href="#trunkwpcontentthemestwentytenheaderphp">trunk/wp-content/themes/twentyten/header.php</a></li>
<li><a href="#trunkwpcontentthemestwentytenindexphp">trunk/wp-content/themes/twentyten/index.php</a></li>
<li><a href="#trunkwpcontentthemestwentytenloopphp">trunk/wp-content/themes/twentyten/loop.php</a></li>
<li><a href="#trunkwpcontentthemestwentytenonecolumnpagephp">trunk/wp-content/themes/twentyten/onecolumn-page.php</a></li>
<li><a href="#trunkwpcontentthemestwentytenpagephp">trunk/wp-content/themes/twentyten/page.php</a></li>
<li><a href="#trunkwpcontentthemestwentytensearchphp">trunk/wp-content/themes/twentyten/search.php</a></li>
<li><a href="#trunkwpcontentthemestwentytensidebarfooterphp">trunk/wp-content/themes/twentyten/sidebar-footer.php</a></li>
<li><a href="#trunkwpcontentthemestwentytensidebarphp">trunk/wp-content/themes/twentyten/sidebar.php</a></li>
<li><a href="#trunkwpcontentthemestwentytensinglephp">trunk/wp-content/themes/twentyten/single.php</a></li>
<li><a href="#trunkwpcontentthemestwentytenstylecss">trunk/wp-content/themes/twentyten/style.css</a></li>
<li><a href="#trunkwpcontentthemestwentytentagphp">trunk/wp-content/themes/twentyten/tag.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpcontentthemestwentyten404php"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/404.php (14707 => 14708)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/404.php        2010-05-17 06:32:03 UTC (rev 14707)
+++ trunk/wp-content/themes/twentyten/404.php        2010-05-17 06:36:11 UTC (rev 14708)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @package WordPress
</span><span class="cx"> * @subpackage Twenty_Ten
</span><del>- * @since 3.0.0
</del><ins>+ * @since Twenty Ten 1.0
</ins><span class="cx"> */
</span><span class="cx"> ?>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytenarchivephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/archive.php (14707 => 14708)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/archive.php        2010-05-17 06:32:03 UTC (rev 14707)
+++ trunk/wp-content/themes/twentyten/archive.php        2010-05-17 06:36:11 UTC (rev 14708)
</span><span class="lines">@@ -9,7 +9,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @package WordPress
</span><span class="cx"> * @subpackage Twenty_Ten
</span><del>- * @since 3.0.0
</del><ins>+ * @since Twenty Ten 1.0
</ins><span class="cx"> */
</span><span class="cx"> ?>
</span><span class="cx">
</span><span class="lines">@@ -18,7 +18,15 @@
</span><span class="cx">                 <div id="container">
</span><span class="cx">                         <div id="content" role="main">
</span><span class="cx">
</span><del>-<?php the_post(); ?>
</del><ins>+<?php
+        /* Queue the first post, that way we know
+         * what date we're dealing with (if that is the case).
+         *
+         * We reset this later so we can run the loop
+         * properly with a call to rewind_posts().
+         */
+        the_post();
+?>
</ins><span class="cx">
</span><span class="cx">                         <h1 class="page-title">
</span><span class="cx"> <?php if ( is_day() ) : ?>
</span><span class="lines">@@ -31,8 +39,14 @@
</span><span class="cx">                                 <?php _e( 'Blog Archives', 'twentyten' ); ?>
</span><span class="cx"> <?php endif; ?>
</span><span class="cx">                         </h1>
</span><del>-<?php rewind_posts(); ?>
</del><ins>+
</ins><span class="cx"> <?php
</span><ins>+        /* Since we called the_post() above, we need to
+         * rewind the loop back to the beginning that way
+         * we can run the loop properly, in full.
+         */
+        rewind_posts();
+
</ins><span class="cx">         /* Run the loop for the archives page to output the posts.
</span><span class="cx">          * If you want to overload this in a child theme then include a file
</span><span class="cx">          * called loop-archives.php and that will be used instead.
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytenattachmentphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/attachment.php (14707 => 14708)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/attachment.php        2010-05-17 06:32:03 UTC (rev 14707)
+++ trunk/wp-content/themes/twentyten/attachment.php        2010-05-17 06:36:11 UTC (rev 14708)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @package WordPress
</span><span class="cx"> * @subpackage Twenty_Ten
</span><del>- * @since 3.0.0
</del><ins>+ * @since Twenty Ten 1.0
</ins><span class="cx"> */
</span><span class="cx"> ?>
</span><span class="cx">
</span><span class="lines">@@ -13,7 +13,7 @@
</span><span class="cx">                 <div id="container">
</span><span class="cx">                         <div id="content" role="main">
</span><span class="cx">
</span><del>-<?php the_post(); ?>
</del><ins>+<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
</ins><span class="cx">
</span><span class="cx">                                 <p class="page-title"><a href="<?php echo get_permalink( $post->post_parent ); ?>" title="<?php printf( esc_attr__( 'Return to %s', 'twentyten' ), esc_html( get_the_title( $post->post_parent ), 1 ) ); ?>" rel="gallery">&larr; <?php echo get_the_title( $post->post_parent ); ?></a></p>
</span><span class="cx">
</span><span class="lines">@@ -98,6 +98,8 @@
</span><span class="cx">
</span><span class="cx"> <?php comments_template(); ?>
</span><span class="cx">
</span><ins>+<?php endwhile; ?>
+
</ins><span class="cx">                         </div><!-- #content -->
</span><span class="cx">                 </div><!-- #container -->
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytenauthorphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/author.php (14707 => 14708)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/author.php        2010-05-17 06:32:03 UTC (rev 14707)
+++ trunk/wp-content/themes/twentyten/author.php        2010-05-17 06:36:11 UTC (rev 14708)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @package WordPress
</span><span class="cx"> * @subpackage Twenty_Ten
</span><del>- * @since 3.0.0
</del><ins>+ * @since Twenty Ten 1.0
</ins><span class="cx"> */
</span><span class="cx"> ?>
</span><span class="cx">
</span><span class="lines">@@ -13,11 +13,22 @@
</span><span class="cx">                 <div id="container">
</span><span class="cx">                         <div id="content" role="main">
</span><span class="cx">
</span><del>-<?php the_post(); ?>
</del><ins>+<?php
+        /* Queue the first post, that way we know who
+         * the author is when we try to get their name,
+         * URL, description, avatar, etc.
+         *
+         * We reset this later so we can run the loop
+         * properly with a call to rewind_posts().
+         */
+        the_post();
+?>
</ins><span class="cx">
</span><span class="cx">                                 <h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentyten' ), "<span class='vcard'><a class='url fn n' href='" . get_author_posts_url( get_the_author_meta( 'ID' ) ) . "' title='" . esc_attr( get_the_author() ) . "' rel='me'>" . get_the_author() . "</a></span>" ); ?></h1>
</span><span class="cx">
</span><del>-<?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?>
</del><ins>+<?php
+// If a user has filled out their description, show a bio on their entries.
+if ( get_the_author_meta( 'description' ) ) : ?>
</ins><span class="cx">                                         <div id="entry-author-info">
</span><span class="cx">                                                 <div id="author-avatar">
</span><span class="cx">                                                         <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?>
</span><span class="lines">@@ -29,9 +40,13 @@
</span><span class="cx">                                         </div><!-- .entry-author-info -->
</span><span class="cx"> <?php endif; ?>
</span><span class="cx">
</span><del>-<?php rewind_posts(); ?>
</del><ins>+<?php
+        /* Since we called the_post() above, we need to
+         * rewind the loop back to the beginning that way
+         * we can run the loop properly, in full.
+         */
+        rewind_posts();
</ins><span class="cx">
</span><del>-<?php
</del><span class="cx">         /* Run the loop for the author archive page to output the authors posts
</span><span class="cx">          * If you want to overload this in a child theme then include a file
</span><span class="cx">          * called loop-author.php and that will be used instead.
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytencategoryphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/category.php (14707 => 14708)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/category.php        2010-05-17 06:32:03 UTC (rev 14707)
+++ trunk/wp-content/themes/twentyten/category.php        2010-05-17 06:36:11 UTC (rev 14708)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @package WordPress
</span><span class="cx"> * @subpackage Twenty_Ten
</span><del>- * @since 3.0.0
</del><ins>+ * @since Twenty Ten 1.0
</ins><span class="cx"> */
</span><span class="cx"> ?>
</span><span class="cx">
</span><span class="lines">@@ -20,9 +20,7 @@
</span><span class="cx">                                         $category_description = category_description();
</span><span class="cx">                                         if ( ! empty( $category_description ) )
</span><span class="cx">                                                 echo '<div class="archive-meta">' . $categorydesc . '</div>';
</span><del>-                                ?>
</del><span class="cx">
</span><del>-                                <?php
</del><span class="cx">                                 /* Run the loop for the category page to output the posts.
</span><span class="cx">                                  * If you want to overload this in a child theme then include a file
</span><span class="cx">                                  * called loop-category.php and that will be used instead.
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytencommentsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/comments.php (14707 => 14708)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/comments.php        2010-05-17 06:32:03 UTC (rev 14707)
+++ trunk/wp-content/themes/twentyten/comments.php        2010-05-17 06:36:11 UTC (rev 14708)
</span><span class="lines">@@ -9,7 +9,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @package WordPress
</span><span class="cx"> * @subpackage Twenty_Ten
</span><del>- * @since 3.0.0
</del><ins>+ * @since Twenty Ten 1.0
</ins><span class="cx"> */
</span><span class="cx"> ?>
</span><span class="cx">
</span><span class="lines">@@ -18,6 +18,10 @@
</span><span class="cx">                                 <div class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyten' ); ?></div>
</span><span class="cx">                         </div><!-- .comments -->
</span><span class="cx"> <?php
</span><ins>+                /* Stop the rest of comments.php from being processed,
+                 * but don't kill the script entirely -- we still have
+                 * to fully load the template.
+                 */
</ins><span class="cx">                 return;
</span><span class="cx">         endif;
</span><span class="cx"> ?>
</span><span class="lines">@@ -27,14 +31,12 @@
</span><span class="cx"> ?>
</span><span class="cx">
</span><span class="cx"> <?php if ( have_comments() ) : ?>
</span><del>-                        <h3 id="comments-title">
-<?php
</del><ins>+                        <h3 id="comments-title"><?php
</ins><span class="cx">                         printf( _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'twentyten' ),
</span><span class="cx">                         number_format_i18n( get_comments_number() ), '<em>' . get_the_title() . '</em>' );
</span><del>-?>
-                        </h3>
</del><ins>+                        ?></h3>
</ins><span class="cx">
</span><del>-<?php if ( get_comment_pages_count() > 1 ) : // are there comments to navigate through ?>
</del><ins>+<?php if ( get_comment_pages_count() > 1 ) : // Are there comments to navigate through? ?>
</ins><span class="cx">                         <div class="navigation">
</span><span class="cx">                                 <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyten' ) ); ?></div>
</span><span class="cx">                                 <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyten' ) ); ?></div>
</span><span class="lines">@@ -42,27 +44,36 @@
</span><span class="cx"> <?php endif; // check for comment navigation ?>
</span><span class="cx">
</span><span class="cx">                         <ol class="commentlist">
</span><del>-                                <?php wp_list_comments( array( 'callback' => 'twentyten_comment' ) ); ?>
</del><ins>+                                <?php
+                                        /* Loop through and list the comments. Tell wp_list_comments()
+                                         * to use twentyten_comment() to format the comments.
+                                         * If you want to overload this in a child theme then you can
+                                         * define twentyten_comment() and that will be used instead.
+                                         * See twentyten_comment() in twentyten/functions.php for more.
+                                         */
+                                        wp_list_comments( array( 'callback' => 'twentyten_comment' ) );
+                                ?>
</ins><span class="cx">                         </ol>
</span><span class="cx">
</span><del>-<?php if ( get_comment_pages_count() > 1 ) : // are there comments to navigate through ?>
</del><ins>+<?php if ( get_comment_pages_count() > 1 ) : // Are there comments to navigate through? ?>
</ins><span class="cx">                         <div class="navigation">
</span><span class="cx">                                 <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyten' ) ); ?></div>
</span><span class="cx">                                 <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyten' ) ); ?></div>
</span><span class="cx">                         </div>
</span><span class="cx"> <?php endif; // check for comment navigation ?>
</span><span class="cx">
</span><del>-<?php else : // this is displayed if there are no comments so far ?>
</del><ins>+<?php else : // or, if we don't have comments:
</ins><span class="cx">
</span><del>-<?php if ( comments_open() ) : // If comments are open, but there are no comments ?>
</del><ins>+        /* If there are no comments and comments are closed,
+         * let's leave a little note, shall we?
+         */
+        if ( ! comments_open() ) :
+?>
+        <p class="nocomments"><?php _e( 'Comments are closed.', 'twentyten' ); ?></p>
+<?php endif; // end ! comments_opened() ?>
</ins><span class="cx">
</span><del>-<?php else : // if comments are closed ?>
</del><ins>+<?php endif; // end have_comments() ?>
</ins><span class="cx">
</span><del>-                <p class="nocomments"><?php _e( 'Comments are closed.', 'twentyten' ); ?></p>
-
-<?php endif; ?>
-<?php endif; ?>
-
</del><span class="cx"> <?php comment_form(); ?>
</span><span class="cx">
</span><span class="cx"> </div><!-- #comments -->
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytenfooterphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/footer.php (14707 => 14708)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/footer.php        2010-05-17 06:32:03 UTC (rev 14707)
+++ trunk/wp-content/themes/twentyten/footer.php        2010-05-17 06:36:11 UTC (rev 14708)
</span><span class="lines">@@ -7,7 +7,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @package WordPress
</span><span class="cx"> * @subpackage Twenty_Ten
</span><del>- * @since 3.0.0
</del><ins>+ * @since Twenty Ten 1.0
</ins><span class="cx"> */
</span><span class="cx"> ?>
</span><span class="cx">         </div><!-- #main -->
</span><span class="lines">@@ -15,7 +15,12 @@
</span><span class="cx">         <div id="footer" role="contentinfo">
</span><span class="cx">                 <div id="colophon">
</span><span class="cx">
</span><del>-<?php get_sidebar( 'footer' ); ?>
</del><ins>+<?php
+        /* A sidebar in the footer? Yep. You can can customize
+         * your footer with four columns of widgets.
+         */
+        get_sidebar( 'footer' );
+?>
</ins><span class="cx">
</span><span class="cx">                         <div id="site-info">
</span><span class="cx">                                 <a href="<?php echo home_url( '/' ) ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytenheaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/header.php (14707 => 14708)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/header.php        2010-05-17 06:32:03 UTC (rev 14707)
+++ trunk/wp-content/themes/twentyten/header.php        2010-05-17 06:36:11 UTC (rev 14708)
</span><span class="lines">@@ -6,11 +6,9 @@
</span><span class="cx"> *
</span><span class="cx"> * @package WordPress
</span><span class="cx"> * @subpackage Twenty_Ten
</span><del>- * @since 3.0.0
</del><ins>+ * @since Twenty Ten 1.0
</ins><span class="cx"> */
</span><del>-?>
-
-<!DOCTYPE html>
</del><ins>+?><!DOCTYPE html>
</ins><span class="cx"> <html <?php language_attributes(); ?>>
</span><span class="cx"> <head>
</span><span class="cx">         <meta charset="<?php bloginfo( 'charset' ); ?>" />
</span><span class="lines">@@ -46,12 +44,12 @@
</span><span class="cx">         <div id="header">
</span><span class="cx">                 <div id="masthead">
</span><span class="cx">                         <div id="branding" role="banner">
</span><del>-                                <?php $heading_tag = ( is_home() || is_front_page() )? 'h1' : 'div'; ?>
</del><ins>+                                <?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>
</ins><span class="cx">                                 <<?php echo $heading_tag; ?> id="site-title">
</span><span class="cx">                                         <span>
</span><span class="cx">                                                 <a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
</span><span class="cx">                                         </span>
</span><del>-                                </<?php echo $heading_tag; ?>>                                
</del><ins>+                                </<?php echo $heading_tag; ?>>
</ins><span class="cx">                                 <div id="site-description"><?php bloginfo( 'description' ); ?></div>
</span><span class="cx">
</span><span class="cx">                                 <?php
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytenindexphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/index.php (14707 => 14708)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/index.php        2010-05-17 06:32:03 UTC (rev 14707)
+++ trunk/wp-content/themes/twentyten/index.php        2010-05-17 06:36:11 UTC (rev 14708)
</span><span class="lines">@@ -10,7 +10,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @package WordPress
</span><span class="cx"> * @subpackage Twenty_Ten
</span><del>- * @since 3.0.0
</del><ins>+ * @since Twenty Ten 1.0
</ins><span class="cx"> */
</span><span class="cx"> ?>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytenloopphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/loop.php (14707 => 14708)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/loop.php        2010-05-17 06:32:03 UTC (rev 14707)
+++ trunk/wp-content/themes/twentyten/loop.php        2010-05-17 06:36:11 UTC (rev 14708)
</span><span class="lines">@@ -9,7 +9,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @package WordPress
</span><span class="cx"> * @subpackage Twenty_Ten
</span><del>- * @since 3.0.0
</del><ins>+ * @since Twenty Ten 1.0
</ins><span class="cx"> */
</span><span class="cx"> ?>
</span><span class="cx">
</span><span class="lines">@@ -26,16 +26,31 @@
</span><span class="cx">         <div id="post-0" class="post error404 not-found">
</span><span class="cx">                 <h1 class="entry-title"><?php _e( 'Not Found', 'twentyten' ); ?></h1>
</span><span class="cx">                 <div class="entry-content">
</span><del>-                        <p><?php _e( 'Apologies, but no results were found for the requested Archive. Perhaps searching will help find a related post.', 'twentyten' ); ?></p>
</del><ins>+                        <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyten' ); ?></p>
</ins><span class="cx">                         <?php get_search_form(); ?>
</span><span class="cx">                 </div><!-- .entry-content -->
</span><span class="cx">         </div><!-- #post-0 -->
</span><span class="cx"> <?php endif; ?>
</span><span class="cx">
</span><del>-<?php /* Start the Loop */ ?>
</del><ins>+<?php
+        /* Start the Loop.
+         *
+         * In Twenty Ten we use the same loop in multiple contexts.
+         * It is broken into three main parts: when we're displaying
+         * posts that are in the gallery category, when we're displaying
+         * posts in the asides category, and finally all other posts.
+         *
+         * Additionally, we sometimes check for whether we are on an
+         * archive page, a search page, etc., allowing for small differences
+         * in the loop on each template without actually duplicating
+         * the rest of the loop that is shared.
+         *
+         * Without further ado, the loop:
+         */ ?>
</ins><span class="cx"> <?php while ( have_posts() ) : the_post(); ?>
</span><span class="cx">
</span><del>-<?php /* How to Display posts in the Gallery Category */ ?>
</del><ins>+<?php /* How to display posts in the Gallery category. */ ?>
+
</ins><span class="cx">         <?php if ( in_category( _x('gallery', 'gallery category slug', 'twentyten') ) ) : ?>
</span><span class="cx">                 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
</span><span class="cx">                         <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
</span><span class="lines">@@ -71,17 +86,19 @@
</span><span class="cx">                 </div>
</span><span class="cx">
</span><span class="cx"> <?php /* How to display posts in the asides category */ ?>
</span><ins>+
</ins><span class="cx">         <?php elseif ( in_category( _x('asides', 'asides category slug', 'twentyten') ) ) : ?>
</span><span class="cx">                 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
</span><del>-        <?php if ( is_archive() || is_search() ) : // Only display Excerpts for archives & search ?>
</del><ins>+
+                <?php if ( is_archive() || is_search() ) : // Display excerpts for archives and search. ?>
</ins><span class="cx">                         <div class="entry-summary">
</span><del>-                                <?php the_excerpt( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
</del><ins>+                                <?php the_excerpt(); ?>
</ins><span class="cx">                         </div><!-- .entry-summary -->
</span><del>-        <?php else : ?>
</del><ins>+                <?php else : ?>
</ins><span class="cx">                         <div class="entry-content">
</span><span class="cx">                                 <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
</span><span class="cx">                         </div><!-- .entry-content -->
</span><del>-        <?php endif; ?>
</del><ins>+                <?php endif; ?>
</ins><span class="cx">
</span><span class="cx">                         <div class="entry-utility">
</span><span class="cx">                                 <?php twentyten_posted_on(); ?>
</span><span class="lines">@@ -89,9 +106,10 @@
</span><span class="cx">                                 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
</span><span class="cx">                                 <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
</span><span class="cx">                         </div><!-- #entry-utility -->
</span><del>-                </div><!-- #post-<?php the_ID(); ?> -->
</del><ins>+                </div><!-- #post-(id) -->
</ins><span class="cx">
</span><del>-<?php /* How to display all other posts */ ?>
</del><ins>+<?php /* How to display all other posts. */ ?>
+
</ins><span class="cx">         <?php else : ?>
</span><span class="cx">                 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
</span><span class="cx">                         <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
</span><span class="lines">@@ -100,7 +118,7 @@
</span><span class="cx">                                 <?php twentyten_posted_on(); ?>
</span><span class="cx">                         </div><!-- .entry-meta -->
</span><span class="cx">
</span><del>-        <?php if ( is_archive() || is_search() ) : // Only display Excerpts for archives & search ?>
</del><ins>+        <?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>
</ins><span class="cx">                         <div class="entry-summary">
</span><span class="cx">                                 <?php the_excerpt( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
</span><span class="cx">                         </div><!-- .entry-summary -->
</span><span class="lines">@@ -114,7 +132,7 @@
</span><span class="cx">                         <div class="entry-utility">
</span><span class="cx">                                 <?php if ( count( get_the_category() ) ) : ?>
</span><span class="cx">                                         <span class="cat-links">
</span><del>-                                                <span class="entry-utility-prep entry-utility-prep-cat-links"><?php printf( __('Posted in %s', 'twentyten' ), '</span> '.get_the_category_list( ', ' ) ); ?>
</del><ins>+                                                <span class="entry-utility-prep entry-utility-prep-cat-links"><?php printf( __('Posted in %s', 'twentyten' ), '</span> ' . get_the_category_list( ', ' ) ); ?>
</ins><span class="cx">                                         </span>
</span><span class="cx">                                         <span class="meta-sep">|</span>
</span><span class="cx">                                 <?php endif; ?>
</span><span class="lines">@@ -134,9 +152,10 @@
</span><span class="cx">
</span><span class="cx">                 <?php comments_template( '', true ); ?>
</span><span class="cx">
</span><del>-        <?php endif; // if different categories queried ?>
-<?php endwhile; ?>
</del><ins>+        <?php endif; // This was the if statement that broke the loop into three parts based on categories. ?>
</ins><span class="cx">
</span><ins>+<?php endwhile; // End the loop. Whew. ?>
+
</ins><span class="cx"> <?php /* Display navigation to next/previous pages when applicable */ ?>
</span><span class="cx"> <?php if ( $wp_query->max_num_pages > 1 ) : ?>
</span><span class="cx">                                 <div id="nav-below" class="navigation">
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytenonecolumnpagephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/onecolumn-page.php (14707 => 14708)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/onecolumn-page.php        2010-05-17 06:32:03 UTC (rev 14707)
+++ trunk/wp-content/themes/twentyten/onecolumn-page.php        2010-05-17 06:36:11 UTC (rev 14708)
</span><span class="lines">@@ -3,20 +3,22 @@
</span><span class="cx"> * Template Name: One column, no sidebar
</span><span class="cx"> *
</span><span class="cx"> * A custom page template without sidebar.
</span><del>- * Selectable from a dropdown menu on the edit page screen.
</del><span class="cx"> *
</span><ins>+ * The "Template Name:" bit above allows this to be selectable
+ * from a dropdown menu on the edit page screen.
+ *
</ins><span class="cx"> * @package WordPress
</span><span class="cx"> * @subpackage Twenty_Ten
</span><del>- * @since 3.0.0
</del><ins>+ * @since Twenty Ten 1.0
</ins><span class="cx"> */
</span><span class="cx"> ?>
</span><span class="cx">
</span><span class="cx"> <?php get_header(); ?>
</span><span class="cx">
</span><del>-                <div id="container" class="onecolumn">
</del><ins>+                <div id="container" class="one-column">
</ins><span class="cx">                         <div id="content" role="main">
</span><span class="cx">
</span><del>-<?php the_post(); ?>
</del><ins>+<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
</ins><span class="cx">
</span><span class="cx">                                 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
</span><span class="cx">                                         <h1 class="entry-title"><?php the_title(); ?></h1>
</span><span class="lines">@@ -29,6 +31,8 @@
</span><span class="cx">
</span><span class="cx">                                 <?php comments_template( '', true ); ?>
</span><span class="cx">
</span><ins>+<?php endwhile; ?>
+
</ins><span class="cx">                         </div><!-- #content -->
</span><span class="cx">                 </div><!-- #container -->
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytenpagephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/page.php (14707 => 14708)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/page.php        2010-05-17 06:32:03 UTC (rev 14707)
+++ trunk/wp-content/themes/twentyten/page.php        2010-05-17 06:36:11 UTC (rev 14708)
</span><span class="lines">@@ -9,7 +9,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @package WordPress
</span><span class="cx"> * @subpackage Twenty_Ten
</span><del>- * @since 3.0.0
</del><ins>+ * @since Twenty Ten 1.0
</ins><span class="cx"> */
</span><span class="cx"> ?>
</span><span class="cx">
</span><span class="lines">@@ -18,7 +18,7 @@
</span><span class="cx">                 <div id="container">
</span><span class="cx">                         <div id="content" role="main">
</span><span class="cx">
</span><del>-<?php the_post(); ?>
</del><ins>+<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
</ins><span class="cx">
</span><span class="cx">                                 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
</span><span class="cx">                                         <?php if ( is_front_page() ) { ?>
</span><span class="lines">@@ -36,6 +36,8 @@
</span><span class="cx">
</span><span class="cx">                                 <?php comments_template( '', true ); ?>
</span><span class="cx">
</span><ins>+<?php endwhile; ?>
+
</ins><span class="cx">                         </div><!-- #content -->
</span><span class="cx">                 </div><!-- #container -->
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytensearchphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/search.php (14707 => 14708)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/search.php        2010-05-17 06:32:03 UTC (rev 14707)
+++ trunk/wp-content/themes/twentyten/search.php        2010-05-17 06:36:11 UTC (rev 14708)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @package WordPress
</span><span class="cx"> * @subpackage Twenty_Ten
</span><del>- * @since 3.0.0
</del><ins>+ * @since Twenty Ten 1.0
</ins><span class="cx"> */
</span><span class="cx"> ?>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytensidebarfooterphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/sidebar-footer.php (14707 => 14708)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/sidebar-footer.php        2010-05-17 06:32:03 UTC (rev 14707)
+++ trunk/wp-content/themes/twentyten/sidebar-footer.php        2010-05-17 06:36:11 UTC (rev 14708)
</span><span class="lines">@@ -4,25 +4,33 @@
</span><span class="cx"> *
</span><span class="cx"> * @package WordPress
</span><span class="cx"> * @subpackage Twenty_Ten
</span><del>- * @since 3.0.0
</del><ins>+ * @since Twenty Ten 1.0
</ins><span class="cx"> */
</span><span class="cx"> ?>
</span><span class="cx">
</span><span class="cx"> <?php
</span><del>-        if (
-                is_active_sidebar( 'first-footer-widget-area' ) ||
-                is_active_sidebar( 'second-footer-widget-area' ) ||
-                is_active_sidebar( 'third-footer-widget-area' ) ||
-                is_active_sidebar( 'fourth-footer-widget-area' )
-        ) :
</del><ins>+        /* The footer widget area is triggered if any of the areas
+         * have widgets. So let's check that first.
+         *
+         * If none of the sidebars have widgets, then let's bail early.
+         */
+        if ( ! is_active_sidebar( 'first-footer-widget-area' )
+                && ! is_active_sidebar( 'second-footer-widget-area' )
+                && ! is_active_sidebar( 'third-footer-widget-area' )
+                && ! is_active_sidebar( 'fourth-footer-widget-area' )
+        )
+                return;
+        // If we get this far, we have widgets. Let do this.
</ins><span class="cx"> ?>
</span><ins>+
</ins><span class="cx">                         <div id="footer-widget-area" role="complementary">
</span><ins>+
</ins><span class="cx"> <?php if ( is_active_sidebar( 'first-footer-widget-area' ) ) : ?>
</span><del>-                                        <div id="first" class="widget-area">
-                                                <ul class="xoxo">
-                                                        <?php dynamic_sidebar( 'first-footer-widget-area' ); ?>
-                                                </ul>
-                                        </div><!-- #first .widget-area -->
</del><ins>+                                <div id="first" class="widget-area">
+                                        <ul class="xoxo">
+                                                <?php dynamic_sidebar( 'first-footer-widget-area' ); ?>
+                                        </ul>
+                                </div><!-- #first .widget-area -->
</ins><span class="cx"> <?php endif; ?>
</span><span class="cx">
</span><span class="cx"> <?php if ( is_active_sidebar( 'second-footer-widget-area' ) ) : ?>
</span><span class="lines">@@ -50,4 +58,3 @@
</span><span class="cx"> <?php endif; ?>
</span><span class="cx">
</span><span class="cx">                         </div><!-- #footer-widget-area -->
</span><del>-<?php endif; ?>
</del></span></pre></div>
<a id="trunkwpcontentthemestwentytensidebarphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/sidebar.php (14707 => 14708)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/sidebar.php        2010-05-17 06:32:03 UTC (rev 14707)
+++ trunk/wp-content/themes/twentyten/sidebar.php        2010-05-17 06:36:11 UTC (rev 14708)
</span><span class="lines">@@ -4,13 +4,21 @@
</span><span class="cx"> *
</span><span class="cx"> * @package WordPress
</span><span class="cx"> * @subpackage Twenty_Ten
</span><del>- * @since 3.0.0
</del><ins>+ * @since Twenty Ten 1.0
</ins><span class="cx"> */
</span><span class="cx"> ?>
</span><span class="cx">
</span><span class="cx">                 <div id="primary" class="widget-area" role="complementary">
</span><span class="cx">                         <ul class="xoxo">
</span><del>-<?php if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : // begin primary widget area ?>
</del><ins>+
+<?php
+        /* When we call the dynamic_sidebar() function, it'll spit out
+         * the widgets for that widget area. If it instead returns false,
+         * then the sidebar simply doesn't exist, so we'll hard-code in
+         * some default sidebar stuff just in case.
+         */
+        if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?>
+        
</ins><span class="cx">                         <li id="search" class="widget-container widget_search">
</span><span class="cx">                                 <?php get_search_form(); ?>
</span><span class="cx">                         </li>
</span><span class="lines">@@ -30,14 +38,19 @@
</span><span class="cx">                                         <?php wp_meta(); ?>
</span><span class="cx">                                 </ul>
</span><span class="cx">                         </li>
</span><del>-<?php endif; // end primary widget area ?>
</del><ins>+
+                <?php endif; // end primary widget area ?>
</ins><span class="cx">                         </ul>
</span><span class="cx">                 </div><!-- #primary .widget-area -->
</span><span class="cx">
</span><del>-<?php if ( is_active_sidebar( 'secondary-widget-area' ) ) : // Nothing here by default and design ?>
</del><ins>+<?php
+        // A second sidebar for widgets, just because.
+        if ( is_active_sidebar( 'secondary-widget-area' ) ) : ?>
+
</ins><span class="cx">                 <div id="secondary" class="widget-area" role="complementary">
</span><span class="cx">                         <ul class="xoxo">
</span><span class="cx">                                 <?php dynamic_sidebar( 'secondary-widget-area' ); ?>
</span><span class="cx">                         </ul>
</span><span class="cx">                 </div><!-- #secondary .widget-area -->
</span><ins>+
</ins><span class="cx"> <?php endif; ?>
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytensinglephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/single.php (14707 => 14708)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/single.php        2010-05-17 06:32:03 UTC (rev 14707)
+++ trunk/wp-content/themes/twentyten/single.php        2010-05-17 06:36:11 UTC (rev 14708)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @package WordPress
</span><span class="cx"> * @subpackage Twenty_Ten
</span><del>- * @since 3.0.0
</del><ins>+ * @since Twenty Ten 1.0
</ins><span class="cx"> */
</span><span class="cx"> ?>
</span><span class="cx">
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx">                                                 <?php twentyten_posted_in(); ?>
</span><span class="cx">                                                 <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
</span><span class="cx">                                         </div><!-- .entry-utility -->
</span><del>-                                </div><!-- #post-<?php the_ID(); ?> -->
</del><ins>+                                </div><!-- #post-(id) -->
</ins><span class="cx">
</span><span class="cx">                                 <div id="nav-below" class="navigation">
</span><span class="cx">                                         <div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div>
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytenstylecss"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/style.css (14707 => 14708)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/style.css        2010-05-17 06:32:03 UTC (rev 14707)
+++ trunk/wp-content/themes/twentyten/style.css        2010-05-17 06:36:11 UTC (rev 14708)
</span><span class="lines">@@ -87,7 +87,7 @@
</span><span class="cx"> DESCRIPTION: One centered column with no sidebar
</span><span class="cx"> */
</span><span class="cx">
</span><del>-.onecolumn #content {
</del><ins>+.one-column #content {
</ins><span class="cx">         margin: 0 auto;
</span><span class="cx">         width: 640px;
</span><span class="cx"> }
</span><span class="lines">@@ -1303,7 +1303,7 @@
</span><span class="cx">                 margin: 0;
</span><span class="cx">         }
</span><span class="cx">         #content,
</span><del>-        .onecolumn #content {
</del><ins>+        .one-column #content {
</ins><span class="cx">                 width: 100%;
</span><span class="cx">                 margin: 24pt 0 0;
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytentagphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/tag.php (14707 => 14708)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/tag.php        2010-05-17 06:32:03 UTC (rev 14707)
+++ trunk/wp-content/themes/twentyten/tag.php        2010-05-17 06:36:11 UTC (rev 14708)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx"> *
</span><span class="cx"> * @package WordPress
</span><span class="cx"> * @subpackage Twenty_Ten
</span><del>- * @since 3.0.0
</del><ins>+ * @since Twenty Ten 1.0
</ins><span class="cx"> */
</span><span class="cx"> ?>
</span><span class="cx">
</span><span class="lines">@@ -13,14 +13,10 @@
</span><span class="cx">                 <div id="container">
</span><span class="cx">                         <div id="content" role="main">
</span><span class="cx">
</span><del>-<?php the_post(); ?>
</del><ins>+                                <h1 class="page-title"><?php
+                                        printf( __( 'Tag Archives: %s', 'twentyten' ), '<span>' . single_tag_title( '', false ) . '</span>' );
+                                ?></h1>
</ins><span class="cx">
</span><del>-                                <h1 class="page-title">
-                                        <?php printf( __( 'Tag Archives: %s', 'twentyten' ), '<span>' . single_tag_title( '', false ) . '</span>' ); ?>
-                                </h1>
-
-<?php rewind_posts(); ?>
-
</del><span class="cx"> <?php
</span><span class="cx"> /* Run the loop for the tag archive to output the posts
</span><span class="cx"> * If you want to overload this in a child theme then include a file
</span></span></pre>
</div>
</div>
</body>
</html>