WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/25/2011 03:19:33 PM (10 years ago)
Author:
iandstewart
Message:

Twenty Eleven: make categories and tags i18n friendly; Props dimadin; Fixes #17531

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyeleven/content-quote.php

    r17959 r18029  
    5151        <footer class="entry-meta">
    5252            <?php if ( 'post' == $post->post_type ) : // Hide category and tag text for pages on Search ?>
    53             <span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in', 'twentyeleven' ); ?></span> <?php the_category( ', ' ); ?></span>
    54             <?php the_tags( '<span class="sep"> | </span> <span class="tag-links"><span class="entry-utility-prep entry-utility-prep-tag-links">' . __( 'Tagged', 'twentyeleven' ) . '</span> ', ', ', '</span>' ); ?>
    55             <?php endif; ?>
     53            <?php
     54                /* translators: used between list items, there is a space after the comma */
     55                $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );
     56                if ( $categories_list ):
     57            ?>
     58            <span class="cat-links">
     59                <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list );
     60                $show_sep = true; ?>
     61            </span>
     62            <?php endif; // End if categories ?>
     63            <?php
     64                /* translators: used between list items, there is a space after the comma */
     65                $tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );
     66                if ( $tags_list ):
     67                if ( $show_sep ) : ?>
     68            <span class="sep"> | </span>
     69                <?php endif; // End if $show_sep ?>
     70            <span class="tag-links">
     71                <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list );
     72                $show_sep = true; ?>
     73            </span>
     74            <?php endif; // End if $tags_list ?>
     75            <?php endif; // End if 'post' == $post->post_type ?>
    5676
    5777            <?php if ( comments_open() ) : ?>
     78            <?php if ( $show_sep ) : ?>
    5879            <span class="sep"> | </span>
     80            <?php endif; // End if $show_sep ?>
    5981            <span class="comments-link"><?php comments_popup_link( __( '<span class="leave-reply">Leave a reply</span>', 'twentyeleven' ), __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
    60             <?php endif; ?>
     82            <?php endif; // End if comments_open() ?>
    6183
    6284            <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
Note: See TracChangeset for help on using the changeset viewer.