Ticket #13198: twentyten-white-spaces.diff
File twentyten-white-spaces.diff, 17.6 KB (added by , 15 years ago) |
---|
-
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() … … 30 30 ?> 31 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 --> -
wp-content/themes/twentyten/author.php
17 17 18 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 20 <?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?> 21 21 <div id="entry-author-info"> 22 22 <div id="author-avatar"> 23 23 <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?> 24 </div><!-- #author-avatar 24 </div><!-- #author-avatar --> 25 25 <div id="author-description"> 26 26 <h2><?php printf( __( 'About %s', 'twentyten' ), get_the_author() ); ?></h2> 27 27 <?php the_author_meta( 'description' ); ?> 28 </div><!-- #author-description 28 </div><!-- #author-description --> 29 29 </div><!-- .entry-author-info --> 30 30 <?php endif; ?> 31 31 -
wp-content/themes/twentyten/comments.php
29 29 <?php if ( have_comments() ) : ?> 30 30 <h3 id="comments-title"> 31 31 <?php 32 printf( _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'twentyten'),32 printf( _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'twentyten' ), 33 33 number_format_i18n( get_comments_number() ), '<em>' . get_the_title() . '</em>' ); 34 34 ?> 35 35 </h3> -
wp-content/themes/twentyten/footer.php
34 34 <?php wp_footer(); ?> 35 35 36 36 </body> 37 </html> 37 </html> 38 No newline at end of file -
wp-content/themes/twentyten/functions.php
104 104 105 105 // The height and width of your custom header. You can hook into the theme's own filters to change these values. 106 106 // Add a filter to twentyten_header_image_width and twentyten_header_image_height to change these values. 107 define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyten_header_image_width', 108 define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyten_header_image_height', 107 define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyten_header_image_width', 940 ) ); 108 define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyten_header_image_height', 198 ) ); 109 109 110 110 // We'll be using post thumbnails for custom header images on posts and pages. 111 111 // We want them to be 940 pixels wide by 198 pixels tall (larger images will be auto-cropped to fit). … … 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 … … 268 268 <br /> 269 269 <?php endif; ?> 270 270 271 <div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"><?php printf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(), get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'twentyten' ),' 271 <div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"><?php printf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(), get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'twentyten' ),' ','' ); ?></div> 272 272 273 273 <div class="comment-body"><?php comment_text(); ?></div> 274 274 … … 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; … … 294 294 function twentyten_widgets_init() { 295 295 // Area 1 296 296 register_sidebar( array ( 297 'name' => __( 'Primary Widget Area' 297 'name' => __( 'Primary Widget Area', 'twentyten' ), 298 298 'id' => 'primary-widget-area', 299 'description' => __( 'The primary widget area' 299 'description' => __( 'The primary widget area', 'twentyten' ), 300 300 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 301 301 'after_widget' => "</li>", 302 302 'before_title' => '<h3 class="widget-title">', … … 305 305 306 306 // Area 2 307 307 register_sidebar( array ( 308 'name' => __( 'Secondary Widget Area' 308 'name' => __( 'Secondary Widget Area', 'twentyten' ), 309 309 'id' => 'secondary-widget-area', 310 'description' => __( 'The secondary widget area' 310 'description' => __( 'The secondary widget area', 'twentyten' ), 311 311 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 312 312 'after_widget' => "</li>", 313 313 'before_title' => '<h3 class="widget-title">', … … 316 316 317 317 // Area 3 318 318 register_sidebar( array ( 319 'name' => __( 'First Footer Widget Area' 319 'name' => __( 'First Footer Widget Area', 'twentyten' ), 320 320 'id' => 'first-footer-widget-area', 321 'description' => __( 'The first footer widget area' 321 'description' => __( 'The first footer widget area', 'twentyten' ), 322 322 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 323 323 'after_widget' => "</li>", 324 324 'before_title' => '<h3 class="widget-title">', … … 327 327 328 328 // Area 4 329 329 register_sidebar( array ( 330 'name' => __( 'Second Footer Widget Area' 330 'name' => __( 'Second Footer Widget Area', 'twentyten' ), 331 331 'id' => 'second-footer-widget-area', 332 'description' => __( 'The second footer widget area' 332 'description' => __( 'The second footer widget area', 'twentyten' ), 333 333 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 334 334 'after_widget' => "</li>", 335 335 'before_title' => '<h3 class="widget-title">', … … 338 338 339 339 // Area 5 340 340 register_sidebar( array ( 341 'name' => __( 'Third Footer Widget Area' 341 'name' => __( 'Third Footer Widget Area', 'twentyten' ), 342 342 'id' => 'third-footer-widget-area', 343 'description' => __( 'The third footer widget area' 343 'description' => __( 'The third footer widget area', 'twentyten' ), 344 344 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 345 345 'after_widget' => "</li>", 346 346 'before_title' => '<h3 class="widget-title">', … … 349 349 350 350 // Area 6 351 351 register_sidebar( array ( 352 'name' => __( 'Fourth Footer Widget Area' 352 'name' => __( 'Fourth Footer Widget Area', 'twentyten' ), 353 353 'id' => 'fourth-footer-widget-area', 354 'description' => __( 'The fourth footer widget area' 354 'description' => __( 'The fourth footer widget area', 'twentyten' ), 355 355 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 356 356 'after_widget' => "</li>", 357 357 'before_title' => '<h3 class="widget-title">', … … 375 375 function twentyten_get_next_attachment_url() { 376 376 global $post; 377 377 $post = get_post($post); 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') ));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 ) 381 381 if ( $attachment->ID == $post->ID ) -
wp-content/themes/twentyten/header.php
55 55 56 56 <?php 57 57 // Check if this is a post or page, if it has a thumbnail, and if it's a big one 58 if ( 58 if ( is_singular() && 59 59 has_post_thumbnail( $post->ID ) && 60 60 ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail') ) && 61 61 $image[1] >= HEADER_IMAGE_WIDTH ) : -
wp-content/themes/twentyten/index.php
1 1 <?php 2 3 2 /** 4 3 * The main template file 5 4 * … … 13 12 * @subpackage Twenty Ten 14 13 * @since 3.0.0 15 14 */ 16 17 15 ?> 18 16 19 17 <?php get_header(); ?> … … 28 26 */ 29 27 get_template_part( 'loop', 'index' ); 30 28 ?> 29 31 30 </div><!-- #content --> 32 31 </div><!-- #container --> 33 32 -
wp-content/themes/twentyten/loop.php
2 2 /** 3 3 * The loop that displays posts 4 4 * 5 * The loop displays the posts and the post content. 5 * The loop displays the posts and the post content. See 6 6 * http://codex.wordpress.org/The_Loop to understand it and 7 7 * http://codex.wordpress.org/Template_Tags to understand 8 8 * the tags used in it. … … 13 13 */ 14 14 ?> 15 15 16 <?php /* Display navigation to next/previous pages when applicable 16 <?php /* Display navigation to next/previous pages when applicable */ ?> 17 17 <?php if ( $wp_query->max_num_pages > 1 ) : ?> 18 18 <div id="nav-above" class="navigation"> 19 19 <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyten' ) ); ?></div> … … 21 21 </div><!-- #nav-above --> 22 22 <?php endif; ?> 23 23 24 <?php /* If there are no posts to display, such as an empty archive page 24 <?php /* If there are no posts to display, such as an empty archive page */ ?> 25 25 <?php if ( ! have_posts() ) : ?> 26 26 <div id="post-0" class="post error404 not-found"> 27 27 <h1 class="entry-title"><?php _e( 'Not Found', 'twentyten' ); ?></h1> … … 32 32 </div><!-- #post-0 --> 33 33 <?php endif; ?> 34 34 35 <?php /* Start the Loop 35 <?php /* Start the Loop */ ?> 36 36 <?php while ( have_posts() ) : the_post(); ?> 37 37 38 <?php /* How to Display posts in the Gallery Category 38 <?php /* How to Display posts in the Gallery Category */ ?> 39 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> … … 91 91 </div><!-- .entry-summary --> 92 92 <?php else : ?> 93 93 <div class="entry-content"> 94 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>94 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> 95 95 </div><!-- .entry-content --> 96 96 <?php endif; ?> 97 97 … … 112 112 </div><!-- #entry-utility --> 113 113 </div><!-- #post-<?php the_ID(); ?> --> 114 114 115 <?php /* How to display all other posts 115 <?php /* How to display all other posts */ ?> 116 116 <?php else : ?> 117 117 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 118 118 <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> … … 136 136 </div><!-- .entry-summary --> 137 137 <?php else : ?> 138 138 <div class="entry-content"> 139 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>139 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> 140 140 <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?> 141 141 </div><!-- .entry-content --> 142 142 <?php endif; ?> … … 155 155 <?php endif; // if different categories queried ?> 156 156 <?php endwhile; ?> 157 157 158 <?php /* Display navigation to next/previous pages when applicable 159 <?php if ( 158 <?php /* Display navigation to next/previous pages when applicable */ ?> 159 <?php if ( $wp_query->max_num_pages > 1 ) : ?> 160 160 <div id="nav-below" class="navigation"> 161 161 <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyten' ) ); ?></div> 162 162 <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div> -
wp-content/themes/twentyten/single.php
39 39 <div id="entry-author-info"> 40 40 <div id="author-avatar"> 41 41 <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?> 42 </div><!-- #author-avatar 42 </div><!-- #author-avatar --> 43 43 <div id="author-description"> 44 44 <h2><?php _e( 'About ', 'twentyten' ); ?><?php the_author(); ?></h2> 45 45 <?php the_author_meta( 'description' ); ?> 46 46 <div id="author-link"> 47 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> 48 48 </div><!-- #author-link --> 49 </div><!-- #author-description 49 </div><!-- #author-description --> 50 50 </div><!-- .entry-author-info --> 51 51 <?php endif; ?> 52 52