<!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>[14534] trunk/wp-content/themes/twentyten/functions.php:
I18n and whitespace fixes for functions.php in TwentyTen</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/14534">14534</a></dd>
<dt>Author</dt> <dd>nbachiyski</dd>
<dt>Date</dt> <dd>2010-05-10 05:58:24 +0000 (Mon, 10 May 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>I18n and whitespace fixes for functions.php in TwentyTen</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpcontentthemestwentytenfunctionsphp">trunk/wp-content/themes/twentyten/functions.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpcontentthemestwentytenfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/functions.php (14533 => 14534)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/functions.php        2010-05-10 05:28:01 UTC (rev 14533)
+++ trunk/wp-content/themes/twentyten/functions.php        2010-05-10 05:58:24 UTC (rev 14534)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx"> /** Tell WordPress to run twentyten_setup() when the 'after_setup_theme' hook is run. */
</span><span class="cx"> add_action( 'after_setup_theme', 'twentyten_setup' );
</span><span class="cx">
</span><del>-if ( ! function_exists('twentyten_setup') ):
</del><ins>+if ( ! function_exists( 'twentyten_setup' ) ):
</ins><span class="cx"> /**
</span><span class="cx"> * Sets up theme defaults and registers support for various WordPress features.
</span><span class="cx"> *
</span><span class="lines">@@ -121,45 +121,53 @@
</span><span class="cx">         // ... and thus ends the changeable header business.
</span><span class="cx">
</span><span class="cx">         // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI.
</span><del>-        register_default_headers( array (
-                'berries' => array (
</del><ins>+        register_default_headers( array(
+                'berries' => array(
</ins><span class="cx">                         'url' => '%s/images/headers/berries.jpg',
</span><span class="cx">                         'thumbnail_url' => '%s/images/headers/berries-thumbnail.jpg',
</span><ins>+                        /* translators: header image description */
</ins><span class="cx">                         'description' => __( 'Berries', 'twentyten' )
</span><span class="cx">                 ),
</span><del>-                'cherryblossom' => array (
</del><ins>+                'cherryblossom' => array(
</ins><span class="cx">                         'url' => '%s/images/headers/cherryblossoms.jpg',
</span><span class="cx">                         'thumbnail_url' => '%s/images/headers/cherryblossoms-thumbnail.jpg',
</span><ins>+                        /* translators: header image description */                        
</ins><span class="cx">                         'description' => __( 'Cherry Blossoms', 'twentyten' )
</span><span class="cx">                 ),
</span><del>-                'concave' => array (
</del><ins>+                'concave' => array(
</ins><span class="cx">                         'url' => '%s/images/headers/concave.jpg',
</span><span class="cx">                         'thumbnail_url' => '%s/images/headers/concave-thumbnail.jpg',
</span><ins>+                        /* translators: header image description */                        
</ins><span class="cx">                         'description' => __( 'Concave', 'twentyten' )
</span><span class="cx">                 ),
</span><del>-                'fern' => array (
</del><ins>+                'fern' => array(
</ins><span class="cx">                         'url' => '%s/images/headers/fern.jpg',
</span><span class="cx">                         'thumbnail_url' => '%s/images/headers/fern-thumbnail.jpg',
</span><ins>+                        /* translators: header image description */                        
</ins><span class="cx">                         'description' => __( 'Fern', 'twentyten' )
</span><span class="cx">                 ),
</span><del>-                'forestfloor' => array (
</del><ins>+                'forestfloor' => array(
</ins><span class="cx">                         'url' => '%s/images/headers/forestfloor.jpg',
</span><span class="cx">                         'thumbnail_url' => '%s/images/headers/forestfloor-thumbnail.jpg',
</span><ins>+                        /* translators: header image description */                        
</ins><span class="cx">                         'description' => __( 'Forest Floor', 'twentyten' )
</span><span class="cx">                 ),
</span><del>-                'inkwell' => array (
</del><ins>+                'inkwell' => array(
</ins><span class="cx">                         'url' => '%s/images/headers/inkwell.jpg',
</span><span class="cx">                         'thumbnail_url' => '%s/images/headers/inkwell-thumbnail.jpg',
</span><ins>+                        /* translators: header image description */                        
</ins><span class="cx">                         'description' => __( 'Inkwell', 'twentyten' )
</span><span class="cx">                 ),
</span><del>-                'path' => array (
</del><ins>+                'path' => array(
</ins><span class="cx">                         'url' => '%s/images/headers/path.jpg',
</span><span class="cx">                         'thumbnail_url' => '%s/images/headers/path-thumbnail.jpg',
</span><ins>+                        /* translators: header image description */                        
</ins><span class="cx">                         'description' => __( 'Path', 'twentyten' )
</span><span class="cx">                 ),
</span><del>-                'sunset' => array (
</del><ins>+                'sunset' => array(
</ins><span class="cx">                         'url' => '%s/images/headers/sunset.jpg',
</span><span class="cx">                         'thumbnail_url' => '%s/images/headers/sunset-thumbnail.jpg',
</span><ins>+                        /* translators: header image description */                        
</ins><span class="cx">                         'description' => __( 'Sunset', 'twentyten' )
</span><span class="cx">                 )
</span><span class="cx">         ) );
</span><span class="lines">@@ -200,7 +208,7 @@
</span><span class="cx"> function twentyten_the_page_number() {
</span><span class="cx">         global $paged; // Contains page number.
</span><span class="cx">         if ( $paged >= 2 )
</span><del>-                echo ' | ' . sprintf( __( 'Page %s' , 'twentyten' ), $paged );
</del><ins>+                echo ' | ' . sprintf( __( 'Page %s', 'twentyten' ), $paged );
</ins><span class="cx"> }
</span><span class="cx"> endif;
</span><span class="cx">
</span><span class="lines">@@ -266,20 +274,25 @@
</span><span class="cx"> * @since 3.0.0
</span><span class="cx"> */
</span><span class="cx"> function twentyten_comment( $comment, $args, $depth ) {
</span><del>-        $GLOBALS ['comment'] = $comment; ?>
</del><ins>+        $GLOBALS['comment'] = $comment; ?>
</ins><span class="cx">         <?php if ( '' == $comment->comment_type ) : ?>
</span><span class="cx">         <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
</span><span class="cx">                 <div id="comment-<?php comment_ID(); ?>">
</span><span class="cx">                 <div class="comment-author vcard">
</span><span class="cx">                         <?php echo get_avatar( $comment, 40 ); ?>
</span><del>-                        <?php printf( __( '<cite class="fn">%s</cite> <span class="says">says:</span>', 'twentyten' ), get_comment_author_link() ); ?>
</del><ins>+                        <?php printf( __( '%s <span class="says">says:</span>', 'twentyten' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?>
</ins><span class="cx">                 </div>
</span><span class="cx">                 <?php if ( $comment->comment_approved == '0' ) : ?>
</span><span class="cx">                         <em><?php _e( 'Your comment is awaiting moderation.', 'twentyten' ); ?></em>
</span><span class="cx">                         <br />
</span><span class="cx">                 <?php endif; ?>
</span><span class="cx">
</span><del>-                <div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"><?php printf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(), get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' ); ?></div>
</del><ins>+                <div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
+                        <?php
+                                /* translators: 1: date, 2: time */
+                                printf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(), get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' );
+                        ?>
+                </div>
</ins><span class="cx">
</span><span class="cx">                 <div class="comment-body"><?php comment_text(); ?></div>
</span><span class="cx">
</span><span class="lines">@@ -290,7 +303,7 @@
</span><span class="cx">
</span><span class="cx">         <?php else : ?>
</span><span class="cx">         <li class="post pingback">
</span><del>-                <p><?php _e( 'Pingback:', 'twentyten' ); ?> <?php comment_author_link(); ?><?php edit_comment_link ( __('(Edit)', 'twentyten'), ' ' ); ?></p>
</del><ins>+                <p><?php _e( 'Pingback:', 'twentyten' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __('(Edit)', 'twentyten'), ' ' ); ?></p>
</ins><span class="cx">         <?php endif;
</span><span class="cx"> }
</span><span class="cx"> endif;
</span><span class="lines">@@ -304,67 +317,67 @@
</span><span class="cx"> */
</span><span class="cx"> function twentyten_widgets_init() {
</span><span class="cx">         // Area 1
</span><del>-        register_sidebar( array (
</del><ins>+        register_sidebar( array(
</ins><span class="cx">                 'name' => __( 'Primary Widget Area', 'twentyten' ),
</span><span class="cx">                 'id' => 'primary-widget-area',
</span><span class="cx">                 'description' => __( 'The primary widget area', 'twentyten' ),
</span><span class="cx">                 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
</span><del>-                'after_widget' => "</li>",
</del><ins>+                'after_widget' => '</li>',
</ins><span class="cx">                 'before_title' => '<h3 class="widget-title">',
</span><span class="cx">                 'after_title' => '</h3>',
</span><span class="cx">         ) );
</span><span class="cx">
</span><span class="cx">         // Area 2
</span><del>-        register_sidebar( array (
</del><ins>+        register_sidebar( array(
</ins><span class="cx">                 'name' => __( 'Secondary Widget Area', 'twentyten' ),
</span><span class="cx">                 'id' => 'secondary-widget-area',
</span><span class="cx">                 'description' => __( 'The secondary widget area', 'twentyten' ),
</span><span class="cx">                 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
</span><del>-                'after_widget' => "</li>",
</del><ins>+                'after_widget' => '</li>',
</ins><span class="cx">                 'before_title' => '<h3 class="widget-title">',
</span><span class="cx">                 'after_title' => '</h3>',
</span><span class="cx">         ) );
</span><span class="cx">
</span><span class="cx">         // Area 3
</span><del>-        register_sidebar( array (
</del><ins>+        register_sidebar( array(
</ins><span class="cx">                 'name' => __( 'First Footer Widget Area', 'twentyten' ),
</span><span class="cx">                 'id' => 'first-footer-widget-area',
</span><span class="cx">                 'description' => __( 'The first footer widget area', 'twentyten' ),
</span><span class="cx">                 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
</span><del>-                'after_widget' => "</li>",
</del><ins>+                'after_widget' => '</li>',
</ins><span class="cx">                 'before_title' => '<h3 class="widget-title">',
</span><span class="cx">                 'after_title' => '</h3>',
</span><span class="cx">         ) );
</span><span class="cx">
</span><span class="cx">         // Area 4
</span><del>-        register_sidebar( array (
</del><ins>+        register_sidebar( array(
</ins><span class="cx">                 'name' => __( 'Second Footer Widget Area', 'twentyten' ),
</span><span class="cx">                 'id' => 'second-footer-widget-area',
</span><span class="cx">                 'description' => __( 'The second footer widget area', 'twentyten' ),
</span><span class="cx">                 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
</span><del>-                'after_widget' => "</li>",
</del><ins>+                'after_widget' => '</li>',
</ins><span class="cx">                 'before_title' => '<h3 class="widget-title">',
</span><span class="cx">                 'after_title' => '</h3>',
</span><span class="cx">         ) );
</span><span class="cx">
</span><span class="cx">         // Area 5
</span><del>-        register_sidebar( array (
</del><ins>+        register_sidebar( array(
</ins><span class="cx">                 'name' => __( 'Third Footer Widget Area', 'twentyten' ),
</span><span class="cx">                 'id' => 'third-footer-widget-area',
</span><span class="cx">                 'description' => __( 'The third footer widget area', 'twentyten' ),
</span><span class="cx">                 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
</span><del>-                'after_widget' => "</li>",
</del><ins>+                'after_widget' => '</li>',
</ins><span class="cx">                 'before_title' => '<h3 class="widget-title">',
</span><span class="cx">                 'after_title' => '</h3>',
</span><span class="cx">         ) );
</span><span class="cx">
</span><span class="cx">         // Area 6
</span><del>-        register_sidebar( array (
</del><ins>+        register_sidebar( array(
</ins><span class="cx">                 'name' => __( 'Fourth Footer Widget Area', 'twentyten' ),
</span><span class="cx">                 'id' => 'fourth-footer-widget-area',
</span><span class="cx">                 'description' => __( 'The fourth footer widget area', 'twentyten' ),
</span><span class="cx">                 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
</span><del>-                'after_widget' => "</li>",
</del><ins>+                'after_widget' => '</li>',
</ins><span class="cx">                 'before_title' => '<h3 class="widget-title">',
</span><span class="cx">                 'after_title' => '</h3>',
</span><span class="cx">         ) );
</span><span class="lines">@@ -385,7 +398,7 @@
</span><span class="cx"> */
</span><span class="cx"> function twentyten_get_next_attachment_url() {
</span><span class="cx">         global $post;
</span><del>-        $post = get_post($post);
</del><ins>+        $post = get_post( $post );
</ins><span class="cx">         $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) );
</span><span class="cx">
</span><span class="cx">         foreach ( $attachments as $k => $attachment ) {
</span></span></pre>
</div>
</div>
</body>
</html>