Changeset 13720 for trunk/wp-content/themes/twentyten/loop.php
- Timestamp:
- 03/16/2010 08:17:22 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-content/themes/twentyten/loop.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentyten/loop.php
r13498 r13720 1 1 <?php if ( $wp_query->max_num_pages > 1 ) : ?> 2 2 <div id="nav-above" class="navigation"> 3 <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyten' )); ?></div>4 <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' )); ?></div>3 <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyten' ) ); ?></div> 4 <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div> 5 5 </div><!-- #nav-above --> 6 6 <?php endif; ?> … … 19 19 <?php if ( in_category( 'Gallery' ) ) : ?> 20 20 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 21 <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten'), the_title_attribute('echo=0') ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>21 <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> 22 22 23 23 <div class="entry-meta"> 24 24 <?php 25 printf( __( '<span class="meta-prep meta-prep-author">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a> <span class="meta-sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s">%6$s</a></span>', 'twentyten'),25 printf( __( '<span class="meta-prep meta-prep-author">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a> <span class="meta-sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s">%6$s</a></span>', 'twentyten' ), 26 26 get_permalink(), 27 27 esc_attr( get_the_time() ), 28 28 get_the_date(), 29 get_author_posts_url( get_the_author_meta( 'ID') ),29 get_author_posts_url( get_the_author_meta( 'ID' ) ), 30 30 sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ), 31 31 get_the_author() … … 37 37 <div class="gallery-thumb"> 38 38 <a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php 39 $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999) );40 $total_images = count( $images);41 $image = array_shift( $images);39 $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) ); 40 $total_images = count( $images ); 41 $image = array_shift( $images ); 42 42 echo wp_get_attachment_image( $image->ID, 'thumbnail' ); 43 43 ?></a> 44 44 </div> 45 <p><em><?php printf( __( 'This gallery contains <a %1$s>%2$s photos</a>.', 'twentyten'),46 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten'), the_title_attribute('echo=0') ) . '" rel="bookmark"',45 <p><em><?php printf( __( 'This gallery contains <a %1$s>%2$s photos</a>.', 'twentyten' ), 46 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', 47 47 $total_images 48 48 ); ?></em></p> … … 56 56 $category_link = get_category_link( $category_id ); 57 57 ?> 58 <a href="<?php echo $category_link; ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'twentyten'); ?>"><?php _e('More Galleries', 'twentyten'); ?></a>58 <a href="<?php echo $category_link; ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a> 59 59 <span class="meta-sep"> | </span> 60 60 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span> … … 78 78 <div class="entry-utility"> 79 79 <?php 80 printf( __( '<span class="meta-prep meta-prep-author">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a> <span class="meta-sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s">%6$s</a></span>', 'twentyten'),80 printf( __( '<span class="meta-prep meta-prep-author">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a> <span class="meta-sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s">%6$s</a></span>', 'twentyten' ), 81 81 get_permalink(), 82 82 esc_attr( get_the_time() ), 83 83 get_the_date(), 84 get_author_posts_url( get_the_author_meta( 'ID') ),84 get_author_posts_url( get_the_author_meta( 'ID' ) ), 85 85 sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ), 86 86 get_the_author() … … 96 96 <?php else : ?> 97 97 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 98 <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten'), the_title_attribute('echo=0') ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>98 <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> 99 99 100 100 <div class="entry-meta"> 101 101 <?php 102 printf( __( '<span class="meta-prep meta-prep-author">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a> <span class="meta-sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s">%6$s</a></span>', 'twentyten'),102 printf( __( '<span class="meta-prep meta-prep-author">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a> <span class="meta-sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s">%6$s</a></span>', 'twentyten' ), 103 103 get_permalink(), 104 104 esc_attr( get_the_time() ), 105 105 get_the_date(), 106 get_author_posts_url( get_the_author_meta( 'ID') ),106 get_author_posts_url( get_the_author_meta( 'ID' ) ), 107 107 sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ), 108 108 get_the_author() … … 126 126 <span class="meta-sep"> | </span> 127 127 <?php $tags_text = twentyten_tag_list(); ?> 128 <?php if ( ! empty($tags_text) ) : ?>128 <?php if ( ! empty( $tags_text ) ) : ?> 129 129 <span class="tag-links"><span class="entry-utility-prep entry-utility-prep-tag-links"><?php echo $tags_text; ?></span></span> 130 130 <span class="meta-sep"> | </span> … … 142 142 <?php if ( $wp_query->max_num_pages > 1 ) : ?> 143 143 <div id="nav-below" class="navigation"> 144 <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyten' )); ?></div>145 <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' )); ?></div>144 <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyten' ) ); ?></div> 145 <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div> 146 146 </div><!-- #nav-below --> 147 147 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.