| [ XREF Home ] [ Index ] |
PHP Cross Reference of WordPress TrunkProvided by Yoast |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * The template for displaying posts in the Gallery Post Format on index and archive pages 4 * 5 * Learn more: http://codex.wordpress.org/Post_Formats 6 * 7 * @package WordPress 8 * @subpackage Twenty_Eleven 9 * @since Twenty Eleven 1.0 10 */ 11 ?> 12 13 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 14 <header class="entry-header"> 15 <hgroup> 16 <h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1> 17 <h2 class="entry-format"><?php _e( 'Gallery', 'twentyeleven' ); ?></h2> 18 </hgroup> 19 20 <div class="entry-meta"> 21 <?php 22 printf( __( '<span class="sep">Posted on </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s">%6$s</a></span>', 'twentyeleven' ), 23 get_permalink(), 24 get_the_date( 'c' ), 25 get_the_date(), 26 get_author_posts_url( get_the_author_meta( 'ID' ) ), 27 sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ), 28 get_the_author() 29 ); 30 ?> 31 </div><!-- .entry-meta --> 32 </header><!-- .entry-header --> 33 34 <?php if ( is_search() ) : // Only display Excerpts for search pages ?> 35 <div class="entry-summary"> 36 <?php the_excerpt(); ?> 37 </div><!-- .entry-summary --> 38 <?php else : ?> 39 <div class="entry-content"> 40 <?php if ( post_password_required() ) : ?> 41 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?> 42 43 <?php else : ?> 44 <?php 45 $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) ); 46 if ( $images ) : 47 $total_images = count( $images ); 48 $image = array_shift( $images ); 49 $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' ); 50 ?> 51 52 <figure class="gallery-thumb"> 53 <a href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a> 54 </figure><!-- .gallery-thumb --> 55 56 <p><em><?php printf( _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'twentyeleven' ), 57 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', 58 number_format_i18n( $total_images ) 59 ); ?></em></p> 60 <?php endif; ?> 61 <?php the_excerpt(); ?> 62 <?php endif; ?> 63 <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyeleven' ), 'after' => '</div>' ) ); ?> 64 </div><!-- .entry-content --> 65 <?php endif; ?> 66 67 <footer class="entry-meta"> 68 <?php 69 /* translators: used between list items, there is a space after the comma */ 70 $categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) ); 71 if ( $categories_list ): 72 ?> 73 <span class="cat-links"> 74 <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); 75 $show_sep = true; ?> 76 </span> 77 <?php endif; // End if categories ?> 78 <?php 79 /* translators: used between list items, there is a space after the comma */ 80 $tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) ); 81 if ( $tags_list ): 82 if ( $show_sep ) : ?> 83 <span class="sep"> | </span> 84 <?php endif; // End if $show_sep ?> 85 <span class="tag-links"> 86 <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyeleven' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); 87 $show_sep = true; ?> 88 </span> 89 <?php endif; // End if $tags_list ?> 90 91 <?php if ( comments_open() ) : ?> 92 <?php if ( $show_sep ) : ?> 93 <span class="sep"> | </span> 94 <?php endif; // End if $show_sep ?> 95 <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> 96 <?php endif; // End if comments_open() ?> 97 98 <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?> 99 </footer><!-- #entry-meta --> 100 </article><!-- #post-<?php the_ID(); ?> -->
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Jun 1 08:30:02 2011 |
Cross-referenced by PHPXref 0.7 Provided by Yoast and awesome WordPress Hosting |