Make WordPress Core


Ignore:
Timestamp:
05/10/2010 07:06:22 PM (16 years ago)
Author:
nbachiyski
Message:

Clean up loop i18n. Props zeo, see #13198

  • Take out tags from strings
  • Extract two common and complicatd strings into functions
  • Whitespace
File:
1 edited

Legend:

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

    r14476 r14541  
    2525
    2626                                        <div class="entry-meta">
    27                                                 <span class="meta-prep meta-prep-author"><?php _e( 'Posted on ', 'twentyten' ); ?></span>
    28                                                 <a href="<?php the_permalink(); ?>" title="<?php the_time(); ?>" rel="bookmark"><span class="entry-date"><?php echo get_the_date(); ?></span></a>
    29                                                 <span class="meta-sep"><?php _e( ' by ', 'twentyten' ); ?></span>
    30                                                 <span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ); ?>"><?php the_author(); ?></a></span>
     27                                                <?php echo twentyten_posted_on(); ?>
    3128                                        </div><!-- .entry-meta -->
    3229
    … …  
    5249
    5350                                        <div class="entry-utility">
    54                                         <?php
    55                                                 $tag_list = get_the_tag_list('', ', ');
    56                                                 if ( '' != $tag_list ) {
    57                                                         $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' );
    58                                                 } else {
    59                                                         $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' );
    60                                                 }
    61                                                 printf(
    62                                                         $utility_text,
    63                                                         get_the_category_list( ', ' ),
    64                                                         $tag_list,
    65                                                         get_permalink(),
    66                                                         the_title_attribute( 'echo=0' )
    67                                                 );
    68                                         ?>
    69 
    70 <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
     51                                                <?php echo twentyten_posted_in(); ?>
     52                                                <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
    7153                                        </div><!-- .entry-utility -->
    7254                                </div><!-- #post-<?php the_ID(); ?> -->
Note: See TracChangeset for help on using the changeset viewer.