<!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>[13885] trunk/wp-content/themes/twentyten:
Rough cut of Twenty Ten inline documentation.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/13885">13885</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2010-03-29 22:03:15 +0000 (Mon, 29 Mar 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Rough cut of Twenty Ten inline documentation. see <a href="http://trac.wordpress.org/ticket/12695">#12695</a>. props jorbin, demetris.</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="#trunkwpcontentthemestwentytenfunctionsphp">trunk/wp-content/themes/twentyten/functions.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="#trunkwpcontentthemestwentytensearchformphp">trunk/wp-content/themes/twentyten/searchform.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="#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 (13884 => 13885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/404.php        2010-03-29 21:45:31 UTC (rev 13884)
+++ trunk/wp-content/themes/twentyten/404.php        2010-03-29 22:03:15 UTC (rev 13885)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+<?php
+/**
+ * The template for displaying 404 pages (Not Found)
+ *
+ * @package WordPress
+ * @subpackage Twenty Ten
+ * @since 3.0.0
+ */
+?>
+
</ins><span class="cx"> <?php get_header(); ?>
</span><span class="cx">
</span><span class="cx">         <div id="container">
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytenarchivephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/archive.php (13884 => 13885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/archive.php        2010-03-29 21:45:31 UTC (rev 13884)
+++ trunk/wp-content/themes/twentyten/archive.php        2010-03-29 22:03:15 UTC (rev 13885)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+<?php
+/**
+ * Generic template for Archive pages.
+ *
+ * Used to display archive-type pages if nothing more specific matches a query.
+ * For example, puts together date-based pages if no date.php file exists.
+ *
+ * Learn more: http://codex.wordpress.org/Template_Hierarchy
+ *
+ * @package WordPress
+ * @subpackage Twenty Ten
+ * @since 3.0.0
+ */
+?>
+
</ins><span class="cx"> <?php get_header(); ?>
</span><span class="cx">
</span><span class="cx">                 <div id="container">
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytenattachmentphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/attachment.php (13884 => 13885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/attachment.php        2010-03-29 21:45:31 UTC (rev 13884)
+++ trunk/wp-content/themes/twentyten/attachment.php        2010-03-29 22:03:15 UTC (rev 13885)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+<?php
+/**
+ * The template used to display attachments.
+ *
+ * @package WordPress
+ * @subpackage Twenty Ten
+ * @since 3.0.0
+ */
+?>
+
</ins><span class="cx"> <?php get_header(); ?>
</span><span class="cx">
</span><span class="cx">                 <div id="container">
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytenauthorphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/author.php (13884 => 13885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/author.php        2010-03-29 21:45:31 UTC (rev 13884)
+++ trunk/wp-content/themes/twentyten/author.php        2010-03-29 22:03:15 UTC (rev 13885)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+<?php
+/**
+ * The template used to display Author Archive pages
+ *
+ * @package WordPress
+ * @subpackage Twenty Ten
+ * @since 3.0.0
+ */
+?>
+
</ins><span class="cx"> <?php get_header(); ?>
</span><span class="cx">
</span><span class="cx">                 <div id="container">
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytencategoryphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/category.php (13884 => 13885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/category.php        2010-03-29 21:45:31 UTC (rev 13884)
+++ trunk/wp-content/themes/twentyten/category.php        2010-03-29 22:03:15 UTC (rev 13885)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+<?php
+/**
+ * The template used to display Category Archive pages
+ *
+ * @package WordPress
+ * @subpackage Twenty Ten
+ * @since 3.0.0
+ */
+?>
+
</ins><span class="cx"> <?php get_header(); ?>
</span><span class="cx">
</span><span class="cx">                 <div id="container">
</span><span class="lines">@@ -13,7 +23,7 @@
</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 class="cx">                                  */
</span><del>-                                 get_template_part( 'loop', 'category' );
</del><ins>+                                get_template_part( 'loop', 'category' );
</ins><span class="cx">                                 ?>
</span><span class="cx">
</span><span class="cx">                         </div><!-- #content -->
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytencommentsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/comments.php (13884 => 13885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/comments.php        2010-03-29 21:45:31 UTC (rev 13884)
+++ trunk/wp-content/themes/twentyten/comments.php        2010-03-29 22:03:15 UTC (rev 13885)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+<?php
+/**
+ * The template used to display Comments
+ *
+ * The area of the page that contains both current comments
+ * and the comment form. The actual display of comments is
+ * handled by a callback to twentyten_comment which is
+ * located in the functions.php file
+ *
+ * @package WordPress
+ * @subpackage Twenty Ten
+ * @since 3.0.0
+ */
+?>
+
</ins><span class="cx">                         <div id="comments">
</span><span class="cx"> <?php if ( post_password_required() ) : ?>
</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></pre></div>
<a id="trunkwpcontentthemestwentytenfooterphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/footer.php (13884 => 13885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/footer.php        2010-03-29 21:45:31 UTC (rev 13884)
+++ trunk/wp-content/themes/twentyten/footer.php        2010-03-29 22:03:15 UTC (rev 13885)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+<?php
+/**
+ * The template used to display the footer
+ *
+ * Contains the closing of the id=main div and all content
+ * after. Calls sidebar-footer.php for bottom widgets
+ *
+ * @package WordPress
+ * @subpackage Twenty Ten
+ * @since 3.0.0
+ */
+?>
+
</ins><span class="cx">         </div><!-- #main -->
</span><span class="cx">
</span><span class="cx">         <div id="footer">
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytenfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/functions.php (13884 => 13885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/functions.php        2010-03-29 21:45:31 UTC (rev 13884)
+++ trunk/wp-content/themes/twentyten/functions.php        2010-03-29 22:03:15 UTC (rev 13885)
</span><span class="lines">@@ -1,22 +1,81 @@
</span><span class="cx"> <?php
</span><ins>+/**
+ * TwentyTen functions and definitions
+ *
+ * Sets up the theme and provides some helper functions used
+ * in other parts of the theme. All functions are pluggable
+ *
+ * @package WordPress
+ * @subpackage Twenty Ten
+ * @since 3.0.0
+ */
</ins><span class="cx">
</span><del>-// Set the content width based on the Theme CSS
</del><ins>+/**
+ * Set the content width based on the Theme CSS. Can be overriden
+ *
+ * Used in attachment.php to set the width of images. Should
+ * be equal to the width set for .onecolumn #content in style.css
+ */
</ins><span class="cx"> if ( ! isset( $content_width ) )
</span><span class="cx">         $content_width = 640;
</span><span class="cx">
</span><span class="cx"> if ( ! function_exists( 'twentyten_init' ) ) :
</span><ins>+/**
+ * Set up defaults for our theme.
+ *
+ * Sets up theme defaults and tells wordpress that this is a
+ * theme that will take advantage of Post Thumbnails, Custom
+ * Background, Nav Menus and automatic feed links. To
+ * override any of the settings in a child theme, create your
+ * own twentyten_init function
+ *
+ * @uses add_theme_support()
+ */
</ins><span class="cx"> function twentyten_init() {
</span><ins>+        // This theme allows users to set a custom background
+        add_custom_background();
+
+        // This theme styles the visual editor with editor-style.css to match the theme style.
+        add_editor_style();
+
+        // This theme needs post thumbnails
+        add_theme_support( 'post-thumbnails' );
+
+        // This theme uses wp_nav_menu()
+        add_theme_support( 'nav-menus' );
+
+        // We'll be using them for custom header images on posts and pages
+        // so we want them to be 940 pixels wide by 198 pixels tall (larger images will be auto-cropped to fit)
+        set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true );
+
+        // Add default posts and comments RSS feed links to head
+        add_theme_support( 'automatic-feed-links' );
+
+        // Make theme available for translation
+        // Translations can be filed in the /languages/ directory
+        load_theme_textdomain( 'twentyten', TEMPLATEPATH . '/languages' );
+
+        $locale = get_locale();
+        $locale_file = TEMPLATEPATH . "/languages/$locale.php";
+        if ( is_readable( $locale_file ) )
+                require_once( $locale_file );
+
</ins><span class="cx">         // Your Changeable header business starts here
</span><span class="cx">         // No CSS, just IMG call
</span><span class="cx">         define( 'HEADER_TEXTCOLOR', '' );
</span><span class="cx">         define( 'HEADER_IMAGE', '%s/images/headers/forestfloor.jpg' ); // %s is theme dir uri
</span><ins>+
+        // Add a filter to twentyten_header_image_width and twentyten_header_image_height to change these values
</ins><span class="cx">         define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyten_header_image_width', 940 ) );
</span><span class="cx">         define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyten_header_image_height',        198 ) );
</span><ins>+
</ins><span class="cx">         define( 'NO_HEADER_TEXT', true );
</span><span class="cx">
</span><span class="cx">         add_custom_image_header( '', 'twentyten_admin_header_style' );
</span><span class="cx">         // and thus ends the changeable header business
</span><span class="cx">
</span><ins>+        // Default custom headers. %s is a placeholder for the theme template directory
+
</ins><span class="cx">         register_default_headers( array (
</span><span class="cx">                 'berries' => array (
</span><span class="cx">                         'url' => '%s/images/headers/berries.jpg',
</span><span class="lines">@@ -59,38 +118,14 @@
</span><span class="cx">                         'description' => __( 'Sunset', 'twentyten' )
</span><span class="cx">                 )
</span><span class="cx">         ) );
</span><del>-
-        add_custom_background();
-
-        // This theme styles the visual editor with editor-style.css to match the theme style.
-        add_editor_style();
-
-        // This theme needs post thumbnails
-        add_theme_support( 'post-thumbnails' );
-
-        // This theme uses wp_nav_menu()
-        add_theme_support( 'nav-menus' );
-
-        // We'll be using them for custom header images on posts and pages
-        // so we want them to be 940 pixels wide by 198 pixels tall (larger images will be auto-cropped to fit)
-        set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true );
-
-        // Add default posts and comments RSS feed links to head
-        add_theme_support( 'automatic-feed-links' );
-
-        // Make theme available for translation
-        // Translations can be filed in the /languages/ directory
-        load_theme_textdomain( 'twentyten', TEMPLATEPATH . '/languages' );
-
-        $locale = get_locale();
-        $locale_file = TEMPLATEPATH . "/languages/$locale.php";
-        if ( is_readable( $locale_file ) )
-                require_once( $locale_file );
</del><span class="cx"> }
</span><span class="cx"> endif;
</span><span class="cx"> add_action( 'after_setup_theme', 'twentyten_init' );
</span><span class="cx">
</span><span class="cx"> if ( ! function_exists( 'twentyten_admin_header_style' ) ) :
</span><ins>+/**
+ * Callback to style the header image inside the admin
+ */
</ins><span class="cx"> function twentyten_admin_header_style() {
</span><span class="cx"> ?>
</span><span class="cx"> <style type="text/css">
</span><span class="lines">@@ -106,41 +141,66 @@
</span><span class="cx"> }
</span><span class="cx"> endif;
</span><span class="cx">
</span><del>-// Get the page number
</del><span class="cx"> if ( ! function_exists( 'twentyten_get_page_number' ) ) :
</span><ins>+/**
+ * Returns the page number currently being browsed
+ *
+ * Returns a vertical bar followed by page and the page
+ * number. Is pluggable
+ *
+ * @retun string
+ */
</ins><span class="cx"> function twentyten_get_page_number() {
</span><span class="cx">         if ( get_query_var( 'paged' ) )
</span><span class="cx">                 return ' | ' . __( 'Page ' , 'twentyten' ) . get_query_var( 'paged' );
</span><span class="cx"> }
</span><span class="cx"> endif;
</span><span class="cx">
</span><del>-// Echo the page number
</del><span class="cx"> if ( ! function_exists( 'twentyten_the_page_number' ) ) :
</span><ins>+/**
+ * Echos the page number being browsed
+ *
+ * @uses twentyten_get_page_number
+ *
+ */
</ins><span class="cx"> function twentyten_the_page_number() {
</span><span class="cx">         echo twentyten_get_page_number();
</span><span class="cx"> }
</span><span class="cx"> endif;
</span><span class="cx">
</span><del>-// Control excerpt length
</del><span class="cx"> if ( ! function_exists( 'twentyten_excerpt_length' ) ) :
</span><ins>+/**
+ * Sets the excerpt length to 40 charachters. Is pluggable
+ *
+ * @return int
+ */
</ins><span class="cx"> function twentyten_excerpt_length( $length ) {
</span><span class="cx">         return 40;
</span><span class="cx"> }
</span><span class="cx"> endif;
</span><span class="cx"> add_filter( 'excerpt_length', 'twentyten_excerpt_length' );
</span><span class="cx">
</span><del>-
-// Make a nice read more link on excerpts
</del><span class="cx"> if ( ! function_exists( 'twentyten_excerpt_more' ) ) :
</span><ins>+/**
+ * Sets the read more link for excerpts to something pretty
+ *
+ * @return string
+ *
+ */
</ins><span class="cx"> function twentyten_excerpt_more( $more ) {
</span><span class="cx">         return '&nbsp;&hellip; <a href="'. get_permalink() . '">' . __('Continue&nbsp;reading&nbsp;<span class="meta-nav">&rarr;</span>', 'twentyten') . '</a>';
</span><span class="cx"> }
</span><span class="cx"> endif;
</span><span class="cx"> add_filter( 'excerpt_more', 'twentyten_excerpt_more' );
</span><span class="cx">
</span><del>-
-// Template for comments and pingbacks
</del><span class="cx"> if ( ! function_exists( 'twentyten_comment' ) ) :
</span><ins>+/**
+ * Template for comments and pingbacks
+ *
+ * Used as a callback by wp_list_comments for displaying the
+ * comments. Is pluggable
+ *
+ */
</ins><span class="cx"> function twentyten_comment( $comment, $args, $depth ) {
</span><span class="cx">         $GLOBALS ['comment'] = $comment; ?>
</span><span class="cx">         <?php if ( '' == $comment->comment_type ) : ?>
</span><span class="lines">@@ -171,8 +231,12 @@
</span><span class="cx"> }
</span><span class="cx"> endif;
</span><span class="cx">
</span><del>-// Remove inline styles on gallery shortcode
</del><span class="cx"> if ( ! function_exists( 'twentyten_remove_gallery_css' ) ) :
</span><ins>+/**
+ * Remove inline styles on gallery shortcode
+ *
+ * @return string
+ */
</ins><span class="cx"> function twentyten_remove_gallery_css( $css ) {
</span><span class="cx">         return preg_replace( "#<style type='text/css'>(.*?)</style>#s", '', $css );
</span><span class="cx"> }
</span><span class="lines">@@ -180,18 +244,48 @@
</span><span class="cx"> add_filter( 'gallery_style', 'twentyten_remove_gallery_css' );
</span><span class="cx">
</span><span class="cx"> if ( ! function_exists( 'twentyten_cat_list' ) ) :
</span><ins>+/**
+ * Returns the list of categories
+ *
+ * Returns the list of categories based on if we are or are
+ * not browsing a category archive page.
+ *
+ * @uses twentyten_term_list
+ *
+ * @return string
+ */
</ins><span class="cx"> function twentyten_cat_list() {
</span><span class="cx">         return twentyten_term_list( 'category', ', ', __( 'Posted in %s', 'twentyten' ), __( 'Also posted in %s', 'twentyten' ) );
</span><span class="cx"> }
</span><span class="cx"> endif;
</span><span class="cx">
</span><span class="cx"> if ( ! function_exists( 'twentyten_tag_list' ) ) :
</span><ins>+/**
+ * Returns the list of tags
+ *
+ * Returns the list of tags based on if we are or are not
+ * browsing a tag archive page
+ *
+ * @uses twentyten_term_list
+ *
+ * @return string
+ */
</ins><span class="cx"> function twentyten_tag_list() {
</span><span class="cx">         return twentyten_term_list( 'post_tag', ', ', __( 'Tagged %s', 'twentyten' ), __( 'Also tagged %s', 'twentyten' ) );
</span><span class="cx"> }
</span><span class="cx"> endif;
</span><span class="cx">
</span><span class="cx"> if ( ! function_exists( 'twentyten_term_list' ) ) :
</span><ins>+/**
+ * Returns the list of taxonomy items in multiple ways
+ *
+ * Returns the list of taxonomy items differently based on
+ * if we are browsing a term archive page or a different
+ * type of page. If browsing a term archive page and the
+ * post has no other taxonomied terms, it returns empty
+ *
+ * @return string
+ */
</ins><span class="cx"> function twentyten_term_list( $taxonomy, $glue = ', ', $text = '', $also_text = '' ) {
</span><span class="cx">         global $wp_query, $post;
</span><span class="cx">         $current_term = $wp_query->get_queried_object();
</span><span class="lines">@@ -219,8 +313,12 @@
</span><span class="cx"> }
</span><span class="cx"> endif;
</span><span class="cx">
</span><del>-// Register widgetized areas
</del><span class="cx"> if ( ! function_exists( 'twentyten_widgets_init' ) ) :
</span><ins>+/**
+ * Register widgetized areas
+ *
+ * @uses register_sidebar
+ */
</ins><span class="cx"> function twentyten_widgets_init() {
</span><span class="cx">         // Area 1
</span><span class="cx">         register_sidebar( array (
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytenheaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/header.php (13884 => 13885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/header.php        2010-03-29 21:45:31 UTC (rev 13884)
+++ trunk/wp-content/themes/twentyten/header.php        2010-03-29 22:03:15 UTC (rev 13885)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+<?php
+/**
+ * The Header for our theme.
+ *
+ * Displays all of the <head> section and everything up till <div id="main">
+ *
+ * @package WordPress
+ * @subpackage Twenty Ten
+ * @since 3.0.0
+ */
+?>
+
</ins><span class="cx"> <!DOCTYPE html>
</span><span class="cx"> <html <?php language_attributes(); ?>>
</span><span class="cx"> <head>
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytenindexphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/index.php (13884 => 13885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/index.php        2010-03-29 21:45:31 UTC (rev 13884)
+++ trunk/wp-content/themes/twentyten/index.php        2010-03-29 22:03:15 UTC (rev 13885)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+<?php
+
+/**
+ * The main template file
+ *
+ * This is the most generic template file in a WordPress theme
+ * and one of the two required files for a theme (the other being style.css).
+ * It is used to display a page when nothing more specific matches a query.
+ * E.g., it puts together the home page when no home.php file exists.
+ * Learn more: http://codex.wordpress.org/Template_Hierarchy
+ *
+ * @package WordPress
+ * @subpackage Twenty Ten
+ * @since 3.0.0
+ */
+
+?>
+
</ins><span class="cx"> <?php get_header(); ?>
</span><span class="cx">
</span><span class="cx">                 <div id="container">
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytenloopphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/loop.php (13884 => 13885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/loop.php        2010-03-29 21:45:31 UTC (rev 13884)
+++ trunk/wp-content/themes/twentyten/loop.php        2010-03-29 22:03:15 UTC (rev 13885)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+<?php
+/**
+ * The loop that displays posts
+ *
+ * The loop displays the posts and the post content. See
+ * http://codex.wordpress.org/The_Loop to understand it and
+ * http://codex.wordpress.org/Template_Tags to understand
+ * the tags used in it.
+ *
+ * @package WordPress
+ * @subpackage Twenty Ten
+ * @since 3.0.0
+ */
+?>
+
+<?php /* Display navigation to next/previous pages when applicable */ ?>
</ins><span class="cx"> <?php if ( $wp_query->max_num_pages > 1 ) : ?>
</span><span class="cx">         <div id="nav-above" class="navigation">
</span><span class="cx">                 <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentyten' ) ); ?></div>
</span><span class="lines">@@ -5,6 +21,7 @@
</span><span class="cx">         </div><!-- #nav-above -->
</span><span class="cx"> <?php endif; ?>
</span><span class="cx">
</span><ins>+<?php /* If there are no posts to display, such as an empty archive page */ ?>
</ins><span class="cx"> <?php if ( ! have_posts() ) : ?>
</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="lines">@@ -15,7 +32,10 @@
</span><span class="cx">         </div><!-- #post-0 -->
</span><span class="cx"> <?php endif; ?>
</span><span class="cx">
</span><ins>+<?php /* Start the Loop */ ?>
</ins><span class="cx"> <?php while ( have_posts() ) : the_post(); ?>
</span><ins>+
+<?php /* How to Display posts in the Gallery Category */ ?>
</ins><span class="cx">         <?php if ( in_category( 'Gallery' ) ) : ?>
</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">@@ -62,7 +82,7 @@
</span><span class="cx">                         </div><!-- #entry-utility -->
</span><span class="cx">                 </div>
</span><span class="cx">
</span><del>-
</del><ins>+<?php /* How to display posts in the asides category */ ?>
</ins><span class="cx">         <?php elseif ( in_category( 'asides' ) ) : ?>
</span><span class="cx">                 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
</span><span class="cx">         <?php if ( is_archive() || is_search() ) : //Only display Excerpts for archives & search ?>
</span><span class="lines">@@ -92,7 +112,7 @@
</span><span class="cx">                         </div><!-- #entry-utility -->
</span><span class="cx">                 </div><!-- #post-<?php the_ID(); ?> -->
</span><span class="cx">
</span><del>-
</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">@@ -139,6 +159,7 @@
</span><span class="cx">         <?php endif; // if different categories queried ?>
</span><span class="cx"> <?php endwhile; ?>
</span><span class="cx">
</span><ins>+<?php /* Display navigation to next/previous pages when applicable */ ?>
</ins><span class="cx"> <?php if ( $wp_query->max_num_pages > 1 ) : ?>
</span><span class="cx">                                 <div id="nav-below" class="navigation">
</span><span class="cx">                                         <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentyten' ) ); ?></div>
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytenonecolumnpagephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/onecolumn-page.php (13884 => 13885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/onecolumn-page.php        2010-03-29 21:45:31 UTC (rev 13884)
+++ trunk/wp-content/themes/twentyten/onecolumn-page.php        2010-03-29 22:03:15 UTC (rev 13885)
</span><span class="lines">@@ -1,11 +1,18 @@
</span><del>-
</del><span class="cx"> <?php
</span><del>-/*
-Template Name: One column, no sidebar
-Description: A template with no sidebar
-*/
-get_header(); ?>
</del><ins>+/**
+ * Template Name: One column, no sidebar
+ *
+ * A custom page template without sidebar.
+ * Selectable from a dropdown menu on the edit page screen.
+ *
+ * @package WordPress
+ * @subpackage Twenty Ten
+ * @since 3.0.0
+ */
+?>
</ins><span class="cx">
</span><ins>+<?php get_header(); ?>
+
</ins><span class="cx">                 <div id="container" class="onecolumn">
</span><span class="cx">                         <div id="content">
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytenpagephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/page.php (13884 => 13885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/page.php        2010-03-29 21:45:31 UTC (rev 13884)
+++ trunk/wp-content/themes/twentyten/page.php        2010-03-29 22:03:15 UTC (rev 13885)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+<?php
+/**
+ * The template used to display all pages
+ *
+ * This is the template that displays all pages by default.
+ * Please note that this is the wordpress construct of pages
+ * and that other 'pages' on your wordpress site will use a
+ * different template.
+ *
+ * @package WordPress
+ * @subpackage Twenty Ten
+ * @since 3.0.0
+ */
+?>
+
</ins><span class="cx"> <?php get_header(); ?>
</span><span class="cx">
</span><span class="cx">                 <div id="container">
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytensearchphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/search.php (13884 => 13885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/search.php        2010-03-29 21:45:31 UTC (rev 13884)
+++ trunk/wp-content/themes/twentyten/search.php        2010-03-29 22:03:15 UTC (rev 13885)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+<?php
+/**
+ * The Search Results template
+ *
+ * @package WordPress
+ * @subpackage Twenty Ten
+ * @since 3.0.0
+ */
+?>
+
</ins><span class="cx"> <?php get_header(); ?>
</span><span class="cx">
</span><span class="cx">                 <div id="container">
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytensearchformphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/searchform.php (13884 => 13885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/searchform.php        2010-03-29 21:45:31 UTC (rev 13884)
+++ trunk/wp-content/themes/twentyten/searchform.php        2010-03-29 22:03:15 UTC (rev 13885)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+<?php
+/**
+ * The Search Form
+ *
+ * Optional file that allows displaying a custom search form
+ * when the get_search_form() template tag is used.
+ *
+ * @package WordPress
+ * @subpackage Twenty Ten
+ * @since 3.0.0
+ */
+?>
+
</ins><span class="cx"> <form id="searchform" name="searchform" method="get" action="<?php echo home_url(); ?>">
</span><span class="cx">                 <div>
</span><span class="cx">                         <label for="s"><?php _e( 'Search', 'twentyten' ); ?></label>
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytensidebarfooterphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/sidebar-footer.php (13884 => 13885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/sidebar-footer.php        2010-03-29 21:45:31 UTC (rev 13884)
+++ trunk/wp-content/themes/twentyten/sidebar-footer.php        2010-03-29 22:03:15 UTC (rev 13885)
</span><span class="lines">@@ -1,4 +1,14 @@
</span><span class="cx"> <?php
</span><ins>+/**
+ * The Footer widget areas
+ *
+ * @package WordPress
+ * @subpackage Twenty Ten
+ * @since 3.0.0
+ */
+?>
+
+<?php
</ins><span class="cx">         if (
</span><span class="cx">                 is_active_sidebar( 'first-footer-widget-area' ) ||
</span><span class="cx">                 is_active_sidebar( 'second-footer-widget-area' ) ||
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytensidebarphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/sidebar.php (13884 => 13885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/sidebar.php        2010-03-29 21:45:31 UTC (rev 13884)
+++ trunk/wp-content/themes/twentyten/sidebar.php        2010-03-29 22:03:15 UTC (rev 13885)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+<?php
+/**
+ * The Sidebar containing the primary and secondary widget areas
+ *
+ * @package WordPress
+ * @subpackage Twenty Ten
+ * @since 3.0.0
+ */
+?>
+
</ins><span class="cx">                 <div id="primary" class="widget-area">
</span><span class="cx">                         <ul class="xoxo">
</span><span class="cx"> <?php if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : // begin primary widget area ?>
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytensinglephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/single.php (13884 => 13885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/single.php        2010-03-29 21:45:31 UTC (rev 13884)
+++ trunk/wp-content/themes/twentyten/single.php        2010-03-29 22:03:15 UTC (rev 13885)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+<?php
+/**
+ * The Template used to display all single posts
+ *
+ * @package WordPress
+ * @subpackage Twenty Ten
+ * @since 3.0.0
+ */
+?>
+
</ins><span class="cx"> <?php get_header(); ?>
</span><span class="cx">
</span><span class="cx">                 <div id="container">
</span></span></pre></div>
<a id="trunkwpcontentthemestwentytentagphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/tag.php (13884 => 13885)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/tag.php        2010-03-29 21:45:31 UTC (rev 13884)
+++ trunk/wp-content/themes/twentyten/tag.php        2010-03-29 22:03:15 UTC (rev 13885)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+<?php
+/**
+ * The template used to display Tag Archive pages
+ *
+ * @package WordPress
+ * @subpackage Twenty Ten
+ * @since 3.0.0
+ */
+?>
+
</ins><span class="cx"> <?php get_header(); ?>
</span><span class="cx">
</span><span class="cx">                 <div id="container">
</span></span></pre>
</div>
</div>
</body>
</html>