Make WordPress Core

Changeset 14532


Ignore:
Timestamp:
05/10/2010 05:11:11 AM (14 years ago)
Author:
nbachiyski
Message:

Twentyten attachment.php copy and i18n fixes. Props dimadin and zeo. See #13198

  • 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 × 2592 pixel, where the size is the link
  • Whitespace fixes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyten/attachment.php

    r14433 r14532  
    2323                    <div class="entry-meta">
    2424                        <?php
    25                             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'),
    26                                 get_author_posts_url( get_the_author_meta( 'ID' ) ),
    27                                 sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),
    28                                 get_the_author()
     25                            printf(__('<span class="%1$s">By</span> %2$s', 'twentyten'),
     26                                'meta-prep meta-prep-author',
     27                                sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
     28                                    get_author_posts_url( get_the_author_meta( 'ID' ) ),
     29                                    sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),
     30                                    get_the_author()
     31                                )
    2932                            );
    3033                        ?>
    31                         <span class="meta-sep"> | </span>
     34                        <span class="meta-sep">|</span>
    3235                        <?php
    33                             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'),
    34                                 esc_attr( get_the_time() ),
    35                                 get_the_date()
     36                            printf( __('<span class="%1$s">Published</span> %2$s', 'twentyten'),
     37                                'meta-prep meta-prep-entry-date',
     38                                sprintf( '<span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr></span>',
     39                                    esc_attr( get_the_time() ),
     40                                    get_the_date()
     41                                )
    3642                            );
    3743                            if ( wp_attachment_is_image() ) {
     44                                echo ' <span class="meta-sep">|</span> ';
    3845                                $size = getimagesize( wp_get_attachment_url() );
    39                                 printf( __( ' at <a href="%1$s" title="Link to full-size image">%2$s &times; %3$s</a>', 'twentyten'),
    40                                     wp_get_attachment_url(),
    41                                     $size[0],
    42                                     $size[1]
     46                                printf( __( 'Full size is %s pixels', 'twentyten'),
     47                                    sprintf( '<a href="%1$s" title="%2$s">%3$s &times; %4$s</a>',
     48                                        wp_get_attachment_url(),
     49                                        esc_attr( __('Link to full-size image', 'twentyten') ),
     50                                        $size[0],
     51                                        $size[1]
     52                                    )
    4353                                );
    4454                            }                           
     
    5161<?php if ( wp_attachment_is_image() ) : ?>
    5262                        <p class="attachment"><a href="<?php echo twentyten_get_next_attachment_url(); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
    53                             $attachment_size = apply_filters( 'twentyten_attachment_size',  900 );
     63                            $attachment_size = apply_filters( 'twentyten_attachment_size', 900 );
    5464                            echo wp_get_attachment_image( $post->ID, array( $attachment_size, 9999 ) ); // filterable image width with, essentially, no limit for image height.
    5565                        ?></a></p>
     
    6373<?php endif; ?>
    6474                        </div>
    65                         <div class="entry-caption"><?php if ( ! empty( $post->post_excerpt ) ) the_excerpt(); ?></div>
     75                        <div class="entry-caption"><?php if ( !empty( $post->post_excerpt ) ) the_excerpt(); ?></div>
    6676
    67 <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' )  ); ?>
     77<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
    6878<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
    6979
     
    7383                    <?php
    7484                        $tag_list = get_the_tag_list();
    75                         if ( '' != $tag_list ) {
     85                        if ( $tag_list ) {
    7686                            $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' );
    7787                        } else {
     
    8797                        );
    8898                    ?>
    89 
    90 <?php if ( comments_open() && pings_open() ) : // Comments and trackbacks open ?>
    91                         <?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() ); ?>
    92 <?php elseif ( ! comments_open() && pings_open() ) : // Only trackbacks open ?>
    93                         <?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() ); ?>
    94 <?php elseif ( comments_open() && ! pings_open() ) : // Only comments open ?>
    95                         <?php _e( 'Trackbacks are closed, but you can <a class="comment-link" href="#respond" title="Post a comment">post a comment</a>.', 'twentyten' ); ?>
    96 <?php elseif ( ! comments_open() && ! pings_open() ) : // Comments and trackbacks closed ?>
    97                         <?php _e( 'Both comments and trackbacks are currently closed.', 'twentyten' ); ?>
    98 <?php endif; ?>
    9999<?php edit_post_link( __( 'Edit', 'twentyten' ), ' <span class="edit-link">', '</span>' ); ?>
    100100                    </div><!-- .entry-utility -->
Note: See TracChangeset for help on using the changeset viewer.