Ticket #13198: 13198-attachment.php.patch
File 13198-attachment.php.patch, 35.4 KB (added by , 15 years ago) |
---|
-
wp-content/themes/twentyten/footer.php
23 23 </div> 24 24 25 25 <div id="site-generator"> 26 <?php do_action( 'twentyten_credits' ); ?>26 <?php do_action( 'twentyten_credits' ); ?> 27 27 <a href="http://wordpress.org/" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyten' ); ?>" rel="generator"><?php printf( __( 'Proudly powered by %s.', 'twentyten' ), 'WordPress' ); ?></a> 28 28 </div> 29 29 -
wp-content/themes/twentyten/author.php
15 15 16 16 <?php the_post(); ?> 17 17 18 <h1 class="page-title author"><?php printf( __( 'Author Archives: <span class="vcard">%s</span>', 'twentyten' ), "<a class='url fn n' href='" . get_author_posts_url( get_the_author_meta( 'ID' ) ) . "' title='" . esc_attr( get_the_author() ) . "' rel='me'>" . get_the_author() . "</a>"); ?></h1>18 <h1 class="page-title author"><?php printf( __( 'Author Archives: <span class="vcard">%s</span>', 'twentyten' ), '<a class="url fn n" href="' . get_author_posts_url( get_the_author_meta( 'ID' ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a>' ); ?></h1> 19 19 20 <?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries 21 22 23 24 </div><!-- #author-avatar-->25 26 <h2><?php printf( __( 'About %s', 'twentyten' ), get_the_author() ); ?></h2>27 28 </div><!-- #author-description-->29 20 <?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?> 21 <div id="entry-author-info"> 22 <div id="author-avatar"> 23 <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?> 24 </div><!-- #author-avatar --> 25 <div id="author-description"> 26 <h2><?php printf( _x( 'About %s', '%s: post author', 'twentyten' ), get_the_author() ); ?></h2> 27 <?php the_author_meta( 'description' ); ?> 28 </div><!-- #author-description --> 29 </div><!-- .entry-author-info --> 30 30 <?php endif; ?> 31 31 32 <?php rewind_posts(); ?>32 <?php rewind_posts(); ?> 33 33 34 <?php 35 /* Run the loop for the author archive page to output the authors posts 36 * If you want to overload this in a child theme then include a file 37 * called loop-author.php and that will be used instead. 38 */ 39 get_template_part( 'loop', 'author' ); 40 ?> 34 <?php 35 /* Run the loop for the author archive page to output the authors posts 36 * If you want to overload this in a child theme then include a file 37 * called loop-author.php and that will be used instead. 38 */ 39 get_template_part( 'loop', 'author' ); 40 ?> 41 41 42 </div><!-- #content --> 42 43 </div><!-- #container --> 43 44 -
wp-content/themes/twentyten/sidebar-footer.php
17 17 ) : 18 18 ?> 19 19 <div id="footer-widget-area"> 20 20 21 <?php if ( is_active_sidebar( 'first-footer-widget-area' ) ) : ?> 21 22 <div id="first" class="widget-area"> 22 23 <ul class="xoxo"> -
wp-content/themes/twentyten/search.php
14 14 <div id="content"> 15 15 16 16 <?php if ( have_posts() ) : ?> 17 17 18 <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyten' ), '<span>' . get_search_query() . '</span>' ); ?></h1> 19 18 20 <?php 19 21 /* Run the loop for the search to output the results. 20 22 * If you want to overload this in a child theme then include a file 21 23 * called loop-search.php and that will be used instead. 22 24 */ 23 25 get_template_part( 'loop', 'search' ); 24 26 ?> 27 25 28 <?php else : ?> 29 26 30 <div id="post-0" class="post no-results not-found"> 27 31 <h2 class="entry-title"><?php _e( 'Nothing Found', 'twentyten' ); ?></h2> 28 32 <div class="entry-content"> … … 30 34 <?php get_search_form(); ?> 31 35 </div><!-- .entry-content --> 32 36 </div> 37 33 38 <?php endif; ?> 39 34 40 </div><!-- #content --> 35 41 </div><!-- #container --> 36 42 -
wp-content/themes/twentyten/404.php
23 23 24 24 </div><!-- #content --> 25 25 </div><!-- #container --> 26 26 27 <script type="text/javascript"> 27 28 // focus on search field after it has loaded 28 document.getElementById( 's') && document.getElementById('s').focus();29 document.getElementById( 's' ) && document.getElementById( 's' ).focus(); 29 30 </script> 30 31 31 <?php get_footer(); ?> 32 No newline at end of file 32 <?php get_footer(); ?> -
wp-content/themes/twentyten/index.php
19 19 <div id="container"> 20 20 <div id="content"> 21 21 22 <?php 23 /* Run the loop to output the posts. 24 * If you want to overload this in a child theme then include a file 25 * called loop-index.php and that will be used instead. 26 */ 27 get_template_part( 'loop', 'index' ); 28 ?> 22 <?php 23 /* Run the loop to output the posts. 24 * If you want to overload this in a child theme then include a file 25 * called loop-index.php and that will be used instead. 26 */ 27 get_template_part( 'loop', 'index' ); 28 ?> 29 29 30 </div><!-- #content --> 30 31 </div><!-- #container --> 31 32 -
wp-content/themes/twentyten/functions.php
50 50 /** Tell WordPress to run twentyten_setup() when the 'after_setup_theme' hook is run. */ 51 51 add_action( 'after_setup_theme', 'twentyten_setup' ); 52 52 53 if ( ! function_exists( 'twentyten_setup') ):53 if ( ! function_exists( 'twentyten_setup' ) ): 54 54 /** 55 55 * Sets up theme defaults and registers support for various WordPress features. 56 56 * … … 121 121 // ... and thus ends the changeable header business. 122 122 123 123 // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI. 124 register_default_headers( array 125 'berries' => array 124 register_default_headers( array( 125 'berries' => array( 126 126 'url' => '%s/images/headers/berries.jpg', 127 127 'thumbnail_url' => '%s/images/headers/berries-thumbnail.jpg', 128 128 'description' => __( 'Berries', 'twentyten' ) 129 129 ), 130 'cherryblossom' => array 130 'cherryblossom' => array( 131 131 'url' => '%s/images/headers/cherryblossoms.jpg', 132 132 'thumbnail_url' => '%s/images/headers/cherryblossoms-thumbnail.jpg', 133 133 'description' => __( 'Cherry Blossoms', 'twentyten' ) 134 134 ), 135 'concave' => array 135 'concave' => array( 136 136 'url' => '%s/images/headers/concave.jpg', 137 137 'thumbnail_url' => '%s/images/headers/concave-thumbnail.jpg', 138 138 'description' => __( 'Concave', 'twentyten' ) 139 139 ), 140 'fern' => array 140 'fern' => array( 141 141 'url' => '%s/images/headers/fern.jpg', 142 142 'thumbnail_url' => '%s/images/headers/fern-thumbnail.jpg', 143 143 'description' => __( 'Fern', 'twentyten' ) 144 144 ), 145 'forestfloor' => array 145 'forestfloor' => array( 146 146 'url' => '%s/images/headers/forestfloor.jpg', 147 147 'thumbnail_url' => '%s/images/headers/forestfloor-thumbnail.jpg', 148 148 'description' => __( 'Forest Floor', 'twentyten' ) 149 149 ), 150 'inkwell' => array 150 'inkwell' => array( 151 151 'url' => '%s/images/headers/inkwell.jpg', 152 152 'thumbnail_url' => '%s/images/headers/inkwell-thumbnail.jpg', 153 153 'description' => __( 'Inkwell', 'twentyten' ) 154 154 ), 155 'path' => array 155 'path' => array( 156 156 'url' => '%s/images/headers/path.jpg', 157 157 'thumbnail_url' => '%s/images/headers/path-thumbnail.jpg', 158 158 'description' => __( 'Path', 'twentyten' ) 159 159 ), 160 'sunset' => array 160 'sunset' => array( 161 161 'url' => '%s/images/headers/sunset.jpg', 162 162 'thumbnail_url' => '%s/images/headers/sunset-thumbnail.jpg', 163 163 'description' => __( 'Sunset', 'twentyten' ) … … 200 200 function twentyten_the_page_number() { 201 201 global $paged; // Contains page number. 202 202 if ( $paged >= 2 ) 203 echo ' | ' . sprintf( __( 'Page %s' 203 echo ' | ' . sprintf( __( 'Page %s', 'twentyten' ), $paged ); 204 204 } 205 205 endif; 206 206 … … 227 227 * @return string A pretty 'Continue reading' link. 228 228 */ 229 229 function twentyten_excerpt_more( $more ) { 230 return ' … <a href="'. get_permalink() . '">' . __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten') . '</a>';230 return ' … <a href="'. get_permalink() . '">' . __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) . '</a>'; 231 231 } 232 232 add_filter( 'excerpt_more', 'twentyten_excerpt_more' ); 233 233 … … 255 255 * @since 3.0.0 256 256 */ 257 257 function twentyten_comment( $comment, $args, $depth ) { 258 $GLOBALS [ 'comment'] = $comment; ?>258 $GLOBALS [ 'comment' ] = $comment; ?> 259 259 <?php if ( '' == $comment->comment_type ) : ?> 260 260 <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>"> 261 261 <div id="comment-<?php comment_ID(); ?>"> … … 273 273 <div class="comment-body"><?php comment_text(); ?></div> 274 274 275 275 <div class="reply"> 276 <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args[ 'max_depth'] ) ) ); ?>276 <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args[ 'max_depth' ] ) ) ); ?> 277 277 </div> 278 278 </div> 279 279 280 280 <?php else : ?> 281 281 <li class="post pingback"> 282 <p><?php _e( 'Pingback:', 'twentyten' ); ?> <?php comment_author_link(); ?><?php edit_comment_link ( __('(Edit)', 'twentyten'), ' ' ); ?></p>282 <p><?php _e( 'Pingback:', 'twentyten' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' ); ?></p> 283 283 <?php endif; 284 284 } 285 285 endif; … … 293 293 */ 294 294 function twentyten_widgets_init() { 295 295 // Area 1 296 register_sidebar( array 296 register_sidebar( array( 297 297 'name' => __( 'Primary Widget Area', 'twentyten' ), 298 298 'id' => 'primary-widget-area', 299 299 'description' => __( 'The primary widget area', 'twentyten' ), … … 304 304 ) ); 305 305 306 306 // Area 2 307 register_sidebar( array 307 register_sidebar( array( 308 308 'name' => __( 'Secondary Widget Area', 'twentyten' ), 309 309 'id' => 'secondary-widget-area', 310 310 'description' => __( 'The secondary widget area', 'twentyten' ), 311 311 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 312 'after_widget' => "</li>",312 'after_widget' => '</li>', 313 313 'before_title' => '<h3 class="widget-title">', 314 314 'after_title' => '</h3>', 315 315 ) ); 316 316 317 317 // Area 3 318 register_sidebar( array 318 register_sidebar( array( 319 319 'name' => __( 'First Footer Widget Area', 'twentyten' ), 320 320 'id' => 'first-footer-widget-area', 321 321 'description' => __( 'The first footer widget area', 'twentyten' ), 322 322 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 323 'after_widget' => "</li>",323 'after_widget' => '</li>', 324 324 'before_title' => '<h3 class="widget-title">', 325 325 'after_title' => '</h3>', 326 326 ) ); 327 327 328 328 // Area 4 329 register_sidebar( array 329 register_sidebar( array( 330 330 'name' => __( 'Second Footer Widget Area', 'twentyten' ), 331 331 'id' => 'second-footer-widget-area', 332 332 'description' => __( 'The second footer widget area', 'twentyten' ), 333 333 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 334 'after_widget' => "</li>",334 'after_widget' => '</li>', 335 335 'before_title' => '<h3 class="widget-title">', 336 336 'after_title' => '</h3>', 337 337 ) ); … … 342 342 'id' => 'third-footer-widget-area', 343 343 'description' => __( 'The third footer widget area', 'twentyten' ), 344 344 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 345 'after_widget' => "</li>",345 'after_widget' => '</li>', 346 346 'before_title' => '<h3 class="widget-title">', 347 347 'after_title' => '</h3>', 348 348 ) ); 349 349 350 350 // Area 6 351 register_sidebar( array 351 register_sidebar( array( 352 352 'name' => __( 'Fourth Footer Widget Area', 'twentyten' ), 353 353 'id' => 'fourth-footer-widget-area', 354 354 'description' => __( 'The fourth footer widget area', 'twentyten' ), 355 355 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 356 'after_widget' => "</li>",356 'after_widget' => '</li>', 357 357 'before_title' => '<h3 class="widget-title">', 358 358 'after_title' => '</h3>', 359 359 ) ); … … 365 365 */ 366 366 function twentyten_remove_recent_comments_style() { 367 367 global $wp_widget_factory; 368 remove_action( 'wp_head', array( $wp_widget_factory->widgets[ 'WP_Widget_Recent_Comments'], 'recent_comments_style' ) );368 remove_action( 'wp_head', array( $wp_widget_factory->widgets[ 'WP_Widget_Recent_Comments' ], 'recent_comments_style' ) ); 369 369 } 370 370 add_action( 'widgets_init', 'twentyten_remove_recent_comments_style' ); 371 371 … … 374 374 */ 375 375 function twentyten_get_next_attachment_url() { 376 376 global $post; 377 $post = get_post( $post);377 $post = get_post( $post ); 378 378 $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); 379 379 380 380 foreach ( $attachments as $k => $attachment ) { … … 386 386 return get_attachment_link( $attachments[ $k ]->ID ); 387 387 else 388 388 return get_permalink( $post->post_parent ); 389 } 390 No newline at end of file 389 } -
wp-content/themes/twentyten/loop.php
36 36 <?php while ( have_posts() ) : the_post(); ?> 37 37 38 38 <?php /* How to Display posts in the Gallery Category */ ?> 39 <?php if ( in_category( _x( 'gallery', 'gallery category slug', 'twentyten') ) ) : ?>39 <?php if ( in_category( _x( 'gallery', 'gallery category slug', 'twentyten' ) ) ) : ?> 40 40 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 41 41 <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> 42 42 43 43 <div class="entry-meta"> 44 44 <?php 45 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' ),45 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' ), 46 46 get_permalink(), 47 47 esc_attr( get_the_time() ), 48 48 get_the_date(), … … 54 54 </div><!-- .entry-meta --> 55 55 56 56 <div class="entry-content"> 57 <div class="gallery-thumb"> 58 < a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php59 $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) );60 $total_images = count( $images );61 $image = array_shift( $images );62 echo wp_get_attachment_image( $image->ID, 'thumbnail' );63 ?></a>57 <div class="gallery-thumb"> 58 <?php 59 $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) ); 60 $total_images = count( $images ); 61 $image = array_shift( $images ); 62 ?> 63 <a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo wp_get_attachment_image( $image->ID, 'thumbnail' ); ?></a> 64 64 </div> 65 65 <p><em><?php printf( __( 'This gallery contains <a %1$s>%2$s photos</a>.', 'twentyten' ), 66 66 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', … … 76 76 $category_link = get_category_link( $category_id ); 77 77 ?> 78 78 <a href="<?php echo $category_link; ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a> 79 <span class="meta-sep"> |</span>79 <span class="meta-sep">|</span> 80 80 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span> 81 81 <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?> 82 82 </div><!-- #entry-utility --> 83 83 </div> 84 84 85 85 <?php /* How to display posts in the asides category */ ?> 86 <?php elseif ( in_category( _x( 'asides', 'asides category slug', 'twentyten') ) ) : ?>86 <?php elseif ( in_category( _x( 'asides', 'asides category slug', 'twentyten' ) ) ) : ?> 87 87 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 88 88 <?php if ( is_archive() || is_search() ) : // Only display Excerpts for archives & search ?> 89 89 <div class="entry-summary"> … … 97 97 98 98 <div class="entry-utility"> 99 99 <?php 100 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' ),100 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' ), 101 101 get_permalink(), 102 102 esc_attr( get_the_time() ), 103 103 get_the_date(), … … 106 106 get_the_author() 107 107 ); 108 108 ?> 109 <span class="meta-sep"> |</span>109 <span class="meta-sep">|</span> 110 110 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span> 111 111 <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?> 112 112 </div><!-- #entry-utility --> … … 119 119 120 120 <div class="entry-meta"> 121 121 <?php 122 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' ),122 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' ), 123 123 get_permalink(), 124 124 esc_attr( get_the_time() ), 125 125 get_the_date(), … … 142 142 <?php endif; ?> 143 143 144 144 <div class="entry-utility"> 145 <span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in ', 'twentyten' ); ?></span><?php the_category( ', ' ); ?></span>146 <span class="meta-sep"> |</span>147 <?php the_tags( '<span class="tag-links"><span class="entry-utility-prep entry-utility-prep-tag-links">' . __( 'Tagged ', 'twentyten' ) . '</span>', ', ', ' <span class="meta-sep"> |</span>' ); ?>145 <span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in', 'twentyten' ); ?></span> <?php the_category( ', ' ); ?></span> 146 <span class="meta-sep">|</span> 147 <?php the_tags( '<span class="tag-links"><span class="entry-utility-prep entry-utility-prep-tag-links">' . __( 'Tagged ', 'twentyten' ) . '</span>', ', ', ' <span class="meta-sep">|</span>' ); ?> 148 148 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span> 149 149 <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?> 150 150 </div><!-- #entry-utility --> -
wp-content/themes/twentyten/tag.php
15 15 16 16 <?php the_post(); ?> 17 17 18 <h1 class="page-title"><?php 19 printf( __( 'Tag Archives: %s', 'twentyten' ), '<span>' . single_tag_title( '', false ) . '</span>' ); 20 ?></h1> 18 <h1 class="page-title"><?php printf( __( 'Tag Archives: %s', 'twentyten' ), '<span>' . single_tag_title( '', false ) . '</span>' ); ?></h1> 21 19 22 <?php rewind_posts(); ?>20 <?php rewind_posts(); ?> 23 21 24 <?php 25 /* Run the loop for the tag archive to output the posts 26 * If you want to overload this in a child theme then include a file 27 * called loop-tag.php and that will be used instead. 28 */ 29 get_template_part( 'loop', 'tag' ); 30 ?> 22 <?php 23 /* Run the loop for the tag archive to output the posts 24 * If you want to overload this in a child theme then include a file 25 * called loop-tag.php and that will be used instead. 26 */ 27 get_template_part( 'loop', 'tag' ); 28 ?> 29 31 30 </div><!-- #content --> 32 31 </div><!-- #container --> 33 32 -
wp-content/themes/twentyten/category.php
13 13 <div id="container"> 14 14 <div id="content"> 15 15 16 <h1 class="page-title"><?php 17 printf( __( 'Category Archives: %s', 'twentyten' ), '<span>' . single_cat_title( '', false ) . '</span>' ); 18 ?></h1> 19 <?php $categorydesc = category_description(); if ( ! empty( $categorydesc ) ) echo apply_filters( 'archive_meta', '<div class="archive-meta">' . $categorydesc . '</div>' ); ?> 16 <h1 class="page-title"><?php printf( __( 'Category Archives: %s', 'twentyten' ), '<span>' . single_cat_title( '', false ) . '</span>' ); ?></h1> 20 17 18 <?php 19 $categorydesc = category_description(); 20 if ( ! empty( $categorydesc ) ) echo apply_filters( 'archive_meta', '<div class="archive-meta">' . $categorydesc . '</div>' ); 21 ?> 22 21 23 <?php 22 24 /* Run the loop for the category page to output the posts. 23 25 * If you want to overload this in a child theme then include a file 24 26 * called loop-category.php and that will be used instead. 25 27 */ 26 get_template_part( 'loop', 'category' );28 get_template_part( 'loop', 'category' ); 27 29 ?> 28 30 29 31 </div><!-- #content --> -
wp-content/themes/twentyten/archive.php
20 20 21 21 <?php the_post(); ?> 22 22 23 <h1 class="page-title"> 23 24 <?php if ( is_day() ) : ?> 24 < h1 class="page-title"><?php printf( __( 'Daily Archives: <span>%s</span>', 'twentyten' ), get_the_date() ); ?></h1>25 <?php printf( __( 'Daily Archives: <span>%s</span>', 'twentyten' ), get_the_date() ); ?> 25 26 <?php elseif ( is_month() ) : ?> 26 < h1 class="page-title"><?php printf( __( 'Monthly Archives: <span>%s</span>', 'twentyten' ), get_the_date('F Y') ); ?></h1>27 <?php printf( __( 'Monthly Archives: <span>%s</span>', 'twentyten' ), get_the_date('F Y') ); ?> 27 28 <?php elseif ( is_year() ) : ?> 28 < h1 class="page-title"><?php printf( __( 'Yearly Archives: <span>%s</span>', 'twentyten' ), get_the_date('Y') ); ?></h1>29 <?php printf( __( 'Yearly Archives: <span>%s</span>', 'twentyten' ), get_the_date('Y') ); ?> 29 30 <?php else : ?> 30 < h1 class="page-title"><?php _e( 'Blog Archives', 'twentyten' ); ?></h1>31 <?php _e( 'Blog Archives', 'twentyten' ); ?> 31 32 <?php endif; ?> 33 </h1> 32 34 33 <?php rewind_posts(); ?> 34 <?php 35 /* Run the loop for the archives page to output the posts. 36 * If you want to overload this in a child theme then include a file 37 * called loop-archives.php and that will be used instead. 38 */ 39 get_template_part( 'loop', 'archive' ); 40 ?> 35 <?php rewind_posts(); ?> 41 36 37 <?php 38 /* Run the loop for the archives page to output the posts. 39 * If you want to overload this in a child theme then include a file 40 * called loop-archives.php and that will be used instead. 41 */ 42 get_template_part( 'loop', 'archive' ); 43 ?> 44 42 45 </div><!-- #content --> 43 46 </div><!-- #container --> 44 47 -
wp-content/themes/twentyten/single.php
24 24 <h1 class="entry-title"><?php the_title(); ?></h1> 25 25 26 26 <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 28 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' ), 29 get_permalink(), 30 esc_attr( get_the_time() ), 31 get_the_date(), 32 get_author_posts_url( get_the_author_meta( 'ID' ) ), 33 sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ), 34 get_the_author() 35 ); 36 ?> 31 37 </div><!-- .entry-meta --> 32 38 33 39 <div class="entry-content"> … … 41 47 <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?> 42 48 </div><!-- #author-avatar --> 43 49 <div id="author-description"> 44 <h2><?php _e( 'About ', 'twentyten' ); ?><?php the_author(); ?></h2>50 <h2><?php printf( _x( 'About %s', '%s: post author', 'twentyten' ), get_the_author() ); ?></h2> 45 51 <?php the_author_meta( 'description' ); ?> 46 52 <div id="author-link"> 47 <a 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 _e( 'View all posts by ', 'twentyten' ); ?><?php the_author(); ?> →</a>53 <a 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 printf( esc_attr__( 'View all posts by %s →', 'twentyten' ), get_the_author() ); ?></a> 48 54 </div><!-- #author-link --> 49 55 </div><!-- #author-description --> 50 56 </div><!-- .entry-author-info --> … … 52 58 53 59 <div class="entry-utility"> 54 60 <?php 55 $tag_list = get_the_tag_list( '', ', ');61 $tag_list = get_the_tag_list( '', ', ' ); 56 62 if ( '' != $tag_list ) { 57 63 $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 64 } else { … … 67 73 ); 68 74 ?> 69 75 70 <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>76 <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?> 71 77 </div><!-- .entry-utility --> 72 78 </div><!-- #post-<?php the_ID(); ?> --> 73 79 -
wp-content/themes/twentyten/comments.php
16 16 <div id="comments"> 17 17 <?php if ( post_password_required() ) : ?> 18 18 <div class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyten' ); ?></div> 19 </div><!-- .comments -->19 </div><!-- #comments --> 20 20 <?php 21 22 21 return; 22 endif; 23 23 ?> 24 24 25 25 <?php … … 28 28 29 29 <?php if ( have_comments() ) : ?> 30 30 <h3 id="comments-title"> 31 <?php32 33 34 ?>35 31 <?php 32 printf( _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'twentyten' ), 33 number_format_i18n( get_comments_number() ), '<em>' . get_the_title() . '</em>' ); 34 ?> 35 </h3> 36 36 37 37 <?php if ( get_comment_pages_count() > 1 ) : // are there comments to navigate through ?> 38 38 <div class="navigation"> … … 58 58 59 59 <?php else : // if comments are closed ?> 60 60 61 <p class="nocomments"><?php _e( 'Comments are closed.', 'twentyten' ); ?></p>61 <p class="nocomments"><?php _e( 'Comments are closed.', 'twentyten' ); ?></p> 62 62 63 63 <?php endif; ?> 64 64 65 <?php endif; ?> 65 66 66 <?php comment_form(); ?>67 <?php comment_form(); ?> 67 68 68 </div><!-- #comments -->69 </div><!-- #comments --> -
wp-content/themes/twentyten/header.php
35 35 ?></title> 36 36 <link rel="profile" href="http://gmpg.org/xfn/11" /> 37 37 <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" /> 38 <?php if ( is_singular() && get_option( 'thread_comments') ) wp_enqueue_script( 'comment-reply' ); ?>38 <?php if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); ?> 39 39 <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" /> 40 40 <?php wp_head(); ?> 41 41 </head> … … 45 45 <div id="header"> 46 46 <div id="masthead"> 47 47 <div id="branding"> 48 <?php if ( is_home() || is_front_page() ) { ?> 49 <h1 id="site-title"><span><a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></h1> 50 <?php } else { ?> 51 <div id="site-title"><span><a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></div> 52 <?php } ?> 48 <?php 49 $block = ( ( is_home() || is_front_page() ) ? 'h1' : 'div' ); 50 ?> 51 <?php echo "<$block id='site-title'>"; ?><span><a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span><?php echo "</$block>"; ?> 53 52 54 53 <div id="site-description"><?php bloginfo( 'description' ); ?></div> 55 54 … … 57 56 // Check if this is a post or page, if it has a thumbnail, and if it's a big one 58 57 if ( is_singular() && 59 58 has_post_thumbnail( $post->ID ) && 60 ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&59 ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) && 61 60 $image[1] >= HEADER_IMAGE_WIDTH ) : 62 61 // Houston, we have a new header image! 63 62 echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' ); -
wp-content/themes/twentyten/attachment.php
22 22 23 23 <div class="entry-meta"> 24 24 <?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'),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 26 get_author_posts_url( get_the_author_meta( 'ID' ) ), 27 27 sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ), 28 28 get_the_author() 29 29 ); 30 30 ?> 31 <span class="meta-sep"> |</span>31 <span class="meta-sep">|</span> 32 32 <?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'),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 34 esc_attr( get_the_time() ), 35 35 get_the_date() 36 36 ); 37 37 if ( wp_attachment_is_image() ) { 38 38 $size = getimagesize( wp_get_attachment_url() ); 39 printf( __( ' at <a href="%1$s" title="Link to full-size image">%2$s × %3$s</a>', 'twentyten' ),39 printf( __( ' at <a href="%1$s" title="Link to full-size image">%2$s × %3$s</a>', 'twentyten' ), 40 40 wp_get_attachment_url(), 41 41 $size[0], 42 42 $size[1] … … 50 50 <div class="entry-attachment"> 51 51 <?php if ( wp_attachment_is_image() ) : ?> 52 52 <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', 53 $attachment_size = apply_filters( 'twentyten_attachment_size', 900 ); 54 54 echo wp_get_attachment_image( $post->ID, array( $attachment_size, 9999 ) ); // filterable image width with, essentially, no limit for image height. 55 55 ?></a></p> 56 56 … … 64 64 </div> 65 65 <div class="entry-caption"><?php if ( ! empty( $post->post_excerpt ) ) the_excerpt(); ?></div> 66 66 67 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) 67 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> 68 68 <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?> 69 69 70 70 </div><!-- .entry-content -->