<!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>[14532] trunk/wp-content/themes/twentyten/attachment.php:
Twentyten attachment.php copy and i18n fixes.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/14532">14532</a></dd>
<dt>Author</dt> <dd>nbachiyski</dd>
<dt>Date</dt> <dd>2010-05-10 05:11:11 +0000 (Mon, 10 May 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Twentyten attachment.php copy and i18n fixes. Props dimadin and zeo. See <a href="http://trac.wordpress.org/ticket/13198">#13198</a>
* Removed the Post a comment link, since it's not present on any other single post page
* The text and link to the full-size image weren't clear and hard to i18n. Changed to Full size is 3872 ?\195?\151 2592 pixel, where the size is the link
* Whitespace fixes</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpcontentthemestwentytenattachmentphp">trunk/wp-content/themes/twentyten/attachment.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpcontentthemestwentytenattachmentphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-content/themes/twentyten/attachment.php (14531 => 14532)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-content/themes/twentyten/attachment.php        2010-05-10 04:51:57 UTC (rev 14531)
+++ trunk/wp-content/themes/twentyten/attachment.php        2010-05-10 05:11:11 UTC (rev 14532)
</span><span class="lines">@@ -22,24 +22,34 @@
</span><span class="cx">
</span><span class="cx">                                         <div class="entry-meta">
</span><span class="cx">                                                 <?php
</span><del>-                                                        printf(__( '<span class="meta-prep meta-prep-author"> By </span> <span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>', 'twentyten'),
-                                                                get_author_posts_url( get_the_author_meta( 'ID' ) ),
-                                                                sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),
-                                                                get_the_author()
</del><ins>+                                                        printf(__('<span class="%1$s">By</span> %2$s', 'twentyten'),
+                                                                'meta-prep meta-prep-author',
+                                                                sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
+                                                                        get_author_posts_url( get_the_author_meta( 'ID' ) ),
+                                                                        sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),
+                                                                        get_the_author()
+                                                                )
</ins><span class="cx">                                                         );
</span><span class="cx">                                                 ?>
</span><del>-                                                <span class="meta-sep"> | </span>
</del><ins>+                                                <span class="meta-sep">|</span>
</ins><span class="cx">                                                 <?php
</span><del>-                                                        printf( __( '<span class="meta-prep meta-prep-entry-date">Published </span> <span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr></span>', 'twentyten'),
-                                                                esc_attr( get_the_time() ),
-                                                                get_the_date()
</del><ins>+                                                        printf( __('<span class="%1$s">Published</span> %2$s', 'twentyten'),
+                                                                'meta-prep meta-prep-entry-date',
+                                                                sprintf( '<span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr></span>',
+                                                                        esc_attr( get_the_time() ),
+                                                                        get_the_date()
+                                                                )
</ins><span class="cx">                                                         );
</span><span class="cx">                                                         if ( wp_attachment_is_image() ) {
</span><ins>+                                                                echo ' <span class="meta-sep">|</span> ';
</ins><span class="cx">                                                                 $size = getimagesize( wp_get_attachment_url() );
</span><del>-                                                                printf( __( ' at <a href="%1$s" title="Link to full-size image">%2$s &times; %3$s</a>', 'twentyten'),
-                                                                        wp_get_attachment_url(),
-                                                                        $size[0],
-                                                                        $size[1]
</del><ins>+                                                                printf( __( 'Full size is %s pixels', 'twentyten'),
+                                                                        sprintf( '<a href="%1$s" title="%2$s">%3$s &times; %4$s</a>',
+                                                                                wp_get_attachment_url(),
+                                                                                esc_attr( __('Link to full-size image', 'twentyten') ),
+                                                                                $size[0],
+                                                                                $size[1]
+                                                                        )
</ins><span class="cx">                                                                 );
</span><span class="cx">                                                         }                                                        
</span><span class="cx">                                                 ?>
</span><span class="lines">@@ -50,7 +60,7 @@
</span><span class="cx">                                                 <div class="entry-attachment">
</span><span class="cx"> <?php if ( wp_attachment_is_image() ) : ?>
</span><span class="cx">                                                 <p class="attachment"><a href="<?php echo twentyten_get_next_attachment_url(); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
</span><del>-                                                        $attachment_size = apply_filters( 'twentyten_attachment_size', 900 );
</del><ins>+                                                        $attachment_size = apply_filters( 'twentyten_attachment_size', 900 );
</ins><span class="cx">                                                         echo wp_get_attachment_image( $post->ID, array( $attachment_size, 9999 ) ); // filterable image width with, essentially, no limit for image height.
</span><span class="cx">                                                 ?></a></p>
</span><span class="cx">
</span><span class="lines">@@ -62,9 +72,9 @@
</span><span class="cx">                                                 <a href="<?php echo wp_get_attachment_url(); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php echo basename( get_permalink() ); ?></a>
</span><span class="cx"> <?php endif; ?>
</span><span class="cx">                                                 </div>
</span><del>-                                                <div class="entry-caption"><?php if ( ! empty( $post->post_excerpt ) ) the_excerpt(); ?></div>
</del><ins>+                                                <div class="entry-caption"><?php if ( !empty( $post->post_excerpt ) ) the_excerpt(); ?></div>
</ins><span class="cx">
</span><del>-<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
</del><ins>+<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
</ins><span class="cx"> <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
</span><span class="cx">
</span><span class="cx">                                         </div><!-- .entry-content -->
</span><span class="lines">@@ -72,7 +82,7 @@
</span><span class="cx">                                         <div class="entry-utility">
</span><span class="cx">                                         <?php
</span><span class="cx">                                                 $tag_list = get_the_tag_list();
</span><del>-                                                if ( '' != $tag_list ) {
</del><ins>+                                                if ( $tag_list ) {
</ins><span class="cx">                                                         $utility_text = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' );
</span><span class="cx">                                                 } else {
</span><span class="cx">                                                         $utility_text = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' );
</span><span class="lines">@@ -86,16 +96,6 @@
</span><span class="cx">                                                         get_post_comments_feed_link()
</span><span class="cx">                                                 );
</span><span class="cx">                                         ?>
</span><del>-
-<?php if ( comments_open() && pings_open() ) : // Comments and trackbacks open ?>
-                                                <?php printf( __( '<a class="comment-link" href="#respond" title="Post a comment">Post a comment</a> or leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'twentyten' ), get_trackback_url() ); ?>
-<?php elseif ( ! comments_open() && pings_open() ) : // Only trackbacks open ?>
-                                                <?php printf( __( 'Comments are closed, but you can leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'twentyten' ), get_trackback_url() ); ?>
-<?php elseif ( comments_open() && ! pings_open() ) : // Only comments open ?>
-                                                <?php _e( 'Trackbacks are closed, but you can <a class="comment-link" href="#respond" title="Post a comment">post a comment</a>.', 'twentyten' ); ?>
-<?php elseif ( ! comments_open() && ! pings_open() ) : // Comments and trackbacks closed ?>
-                                                <?php _e( 'Both comments and trackbacks are currently closed.', 'twentyten' ); ?>
-<?php endif; ?>
</del><span class="cx"> <?php edit_post_link( __( 'Edit', 'twentyten' ), ' <span class="edit-link">', '</span>' ); ?>
</span><span class="cx">                                         </div><!-- .entry-utility -->
</span><span class="cx">                                 </div><!-- #post-<?php the_ID(); ?> -->
</span></span></pre>
</div>
</div>
</body>
</html>