Ticket #17198: 17198.whitespace.diff
File 17198.whitespace.diff, 18.3 KB (added by , 12 years ago) |
---|
-
wp-content/themes/twentyeleven/author.php
31 31 <?php the_author_meta( 'description' ); ?> 32 32 </div><!-- #author-description --> 33 33 </div><!-- #entry-author-info --> 34 <?php endif; ?> 34 <?php endif; ?> 35 35 36 36 <?php /* Start the Loop */ ?> 37 37 <?php while ( have_posts() ) : the_post(); ?> -
wp-content/themes/twentyeleven/content-aside.php
11 11 12 12 <?php if ( 'post' == $post->post_type ) : ?> 13 13 <?php endif; ?> 14 14 15 15 <?php if ( comments_open() ) : ?> 16 16 <div class="comments-link"> 17 17 <?php comments_popup_link( __( '<span class="leave-reply">Reply</span>', 'twentyeleven' ), __( '1', 'twentyeleven' ), __( '%', 'twentyeleven' ) ); ?> -
wp-content/themes/twentyeleven/content-gallery.php
31 31 <div class="entry-content"> 32 32 <?php if ( post_password_required() ) : ?> 33 33 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?> 34 34 35 35 <?php else : ?> 36 36 <?php 37 37 $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) ); … … 44 44 <figure class="gallery-thumb"> 45 45 <a href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a> 46 46 </figure><!-- .gallery-thumb --> 47 47 48 48 <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' ), 49 49 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', 50 50 number_format_i18n( $total_images ) -
wp-content/themes/twentyeleven/content-link.php
11 11 12 12 <?php if ( 'post' == $post->post_type ) : ?> 13 13 <?php endif; ?> 14 14 15 15 <?php if ( comments_open() ) : ?> 16 16 <div class="comments-link"> 17 17 <?php comments_popup_link( __( '<span class="leave-reply">Reply</span>', 'twentyeleven' ), __( '1', 'twentyeleven' ), __( '%', 'twentyeleven' ) ); ?> -
wp-content/themes/twentyeleven/content-single.php
28 28 <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( '<span>Pages:</span>', 'twentyeleven' ), 'after' => '</div>' ) ); ?> 29 29 </div><!-- .entry-content --> 30 30 31 <footer class="entry-meta"> 31 <footer class="entry-meta"> 32 32 <?php 33 33 $tag_list = get_the_tag_list( '', ', ' ); 34 34 if ( '' != $tag_list ) { … … 47 47 ); 48 48 ?> 49 49 <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?> 50 50 51 51 <?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?> 52 52 <div id="author-info"> 53 53 <div id="author-avatar"> -
wp-content/themes/twentyeleven/content.php
23 23 ?> 24 24 </div><!-- .entry-meta --> 25 25 <?php endif; ?> 26 26 27 27 <?php if ( comments_open() ) : ?> 28 28 <div class="comments-link"> 29 29 <?php comments_popup_link( __( '<span class="leave-reply">Reply</span>', 'twentyeleven' ), __( '1', 'twentyeleven' ), __( '%', 'twentyeleven' ) ); ?> … … 47 47 <span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in ', 'twentyeleven' ); ?></span><?php the_category( ', ' ); ?></span> 48 48 <?php the_tags( '<span class="sep"> | </span><span class="tag-links">' . __( 'Tagged ', 'twentyeleven' ) . '</span>', ', ', '' ); ?> 49 49 <?php endif; ?> 50 50 51 51 <?php if ( comments_open() ) : ?> 52 52 <span class="sep"> | </span> 53 53 <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> 54 54 <?php endif; ?> 55 55 56 56 <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?> 57 57 </footer><!-- #entry-meta --> 58 58 </article><!-- #post-<?php the_ID(); ?> --> -
wp-content/themes/twentyeleven/footer.php
8 8 </div><!-- #main --> 9 9 10 10 <footer id="colophon" role="contentinfo"> 11 11 12 12 <?php if ( is_active_sidebar( 'sidebar-3' ) || is_active_sidebar( 'sidebar-4' ) || is_active_sidebar( 'sidebar-5' ) ) : ?> 13 13 <div id="supplementary" <?php twentyeleven_footer_sidebar_class(); ?>> 14 14 <?php if ( is_active_sidebar( 'sidebar-3' ) ) : ?> 15 15 <div id="first" class="widget-area" role="complementary"> 16 16 <?php dynamic_sidebar( 'sidebar-3' ); ?> 17 17 </div><!-- #first .widget-area --> 18 <?php endif; ?> 18 <?php endif; ?> 19 19 20 20 <?php if ( is_active_sidebar( 'sidebar-4' ) ) : ?> 21 21 <div id="second" class="widget-area" role="complementary"> 22 22 <?php dynamic_sidebar( 'sidebar-4' ); ?> 23 23 </div><!-- #second .widget-area --> 24 <?php endif; ?> 24 <?php endif; ?> 25 25 26 26 <?php if ( is_active_sidebar( 'sidebar-5' ) ) : ?> 27 27 <div id="third" class="widget-area" role="complementary"> 28 28 <?php dynamic_sidebar( 'sidebar-5' ); ?> 29 29 </div><!-- #third .widget-area --> 30 <?php endif; ?> 30 <?php endif; ?> 31 31 </div><!-- #supplementary --> 32 32 <?php endif; ?> 33 33 34 34 <div id="site-generator"> 35 35 <a href="http://wordpress.org/" rel="generator">Proudly powered by WordPress</a><span class="sep"> | </span><?php printf( __( 'Theme: %1$s.', 'twentyeleven' ), 'Twenty Eleven' ); ?> 36 36 </div> -
wp-content/themes/twentyeleven/functions.php
285 285 'before_title' => '<h1 class="widget-title">', 286 286 'after_title' => '</h1>', 287 287 ) ); 288 288 289 289 register_sidebar( array( 290 290 'name' => __( 'Footer Area Two', 'twentyeleven' ), 291 291 'id' => 'sidebar-4', … … 295 295 'before_title' => '<h1 class="widget-title">', 296 296 'after_title' => '</h1>', 297 297 ) ); 298 298 299 299 register_sidebar( array( 300 300 'name' => __( 'Footer Area Three', 'twentyeleven' ), 301 301 'id' => 'sidebar-5', … … 305 305 'before_title' => '<h1 class="widget-title">', 306 306 'after_title' => '</h1>', 307 307 ) ); 308 309 308 } 310 309 add_action( 'init', 'twentyeleven_widgets_init' ); 311 310 … … 355 354 */ 356 355 function twentyeleven_footer_sidebar_class() { 357 356 $count = 0; 358 357 359 358 if ( is_active_sidebar( 'sidebar-3' ) ) 360 359 $count++; 361 360 … … 364 363 365 364 if ( is_active_sidebar( 'sidebar-5' ) ) 366 365 $count++; 367 366 368 367 switch ( $count ) { 369 368 case '1': 370 369 $class = 'one'; … … 377 376 case '3': 378 377 $class = 'three'; 379 378 break; 380 379 381 380 default: 382 381 $class = ''; 383 382 break; 384 383 } 385 384 386 385 if ( '' != $class ) 387 386 echo 'class="' . $class . '"'; 388 387 } … … 411 410 $avatar_size = 68; 412 411 if ( '0' != $comment->comment_parent ) 413 412 $avatar_size = 39; 414 413 415 414 echo get_avatar( $comment, $avatar_size ); 416 415 417 416 printf( __( '%1$s on %2$s%3$s at %4$s%5$s <span class="says">said:</span>', 'twentyeleven' ), 418 417 sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ), 419 418 '<a href="' . esc_url( get_comment_link( $comment->comment_ID ) ) . '"><time pubdate datetime="' . get_comment_time( 'c' ) . '">', 420 419 get_comment_date(), 421 420 get_comment_time(), 422 '</time></a>' 421 '</time></a>' 423 422 ); 424 423 ?> 425 426 <?php edit_comment_link( __( '[Edit]', 'twentyeleven' ), ' ' ); ?> 424 425 <?php edit_comment_link( __( '[Edit]', 'twentyeleven' ), ' ' ); ?> 427 426 </div><!-- .comment-author .vcard --> 428 427 429 428 <?php if ( $comment->comment_approved == '0' ) : ?> -
wp-content/themes/twentyeleven/header.php
52 52 <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> 53 53 <h2 id="site-description"><?php bloginfo( 'description' ); ?></h2> 54 54 </hgroup> 55 55 56 56 <?php 57 57 // Check to see if the header image has been removed 58 58 if ( get_header_image() != '' ) : -
wp-content/themes/twentyeleven/image.php
10 10 <div id="content" role="main"> 11 11 12 12 <?php the_post(); ?> 13 13 14 14 <nav id="nav-single"> 15 15 <span class="nav-previous"><?php previous_image_link( false, __( '← Previous' , 'twentyeleven' ) ); ?></span> 16 16 <span class="nav-next"><?php next_image_link( false, __( 'Next →' , 'twentyeleven' ) ); ?></span> 17 </nav><!-- #nav-single --> 17 </nav><!-- #nav-single --> 18 18 19 19 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 20 20 <header class="entry-header"> … … 70 70 $attachment_size = apply_filters( 'theme_attachment_size', 848 ); 71 71 echo wp_get_attachment_image( $post->ID, array( $attachment_size, 1024 ) ); // filterable image width with 1024px limit for image height. 72 72 ?></a> 73 73 74 74 <?php if ( ! empty( $post->post_excerpt ) ) : ?> 75 75 <div class="entry-caption"> 76 76 <?php the_excerpt(); ?> 77 77 </div> 78 <?php endif; ?> 78 <?php endif; ?> 79 79 </div><!-- .attachment --> 80 80 81 81 </div><!-- .entry-attachment --> -
wp-content/themes/twentyeleven/showcase.php
11 11 12 12 <div id="primary" class="showcase"> 13 13 <div id="content" role="main"> 14 14 15 15 <?php the_post(); ?> 16 16 17 17 <?php 18 18 // If we have content for this page, let's display it. 19 19 if ( '' != get_the_content() ) 20 20 get_template_part( 'content', 'intro' ); 21 21 ?> 22 22 23 23 <?php 24 24 // See if we have any sticky posts and use the latest to create a featured post 25 25 $sticky = get_option( 'sticky_posts' ); … … 27 27 'posts_per_page' => 1, 28 28 'post__in' => $sticky, 29 29 ); 30 30 31 31 $featured = new WP_Query(); 32 32 $featured->query( $featured_args ); 33 33 34 34 // Let's roll. 35 35 if ( $sticky ) : 36 36 37 37 $featured->the_post(); 38 38 39 39 // We're going to add a class to our featured post for featured images 40 40 // by default it'll have no class though 41 41 $feature_class = ''; … … 54 54 } 55 55 } 56 56 ?> 57 57 58 58 <?php if ( has_post_thumbnail() ) : ?> 59 59 <section class="featured-post <?php echo $feature_class; ?>"> 60 60 <?php else : ?> … … 69 69 <?php } else { ?> 70 70 <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_post_thumbnail( 'small-feature' ); ?></a> 71 71 <?php } 72 } 73 ?> 72 } 73 ?> 74 74 <?php get_template_part( 'content', 'featured' ); ?> 75 </section> 75 </section> 76 76 <?php endif; ?> 77 77 78 78 <section class="recent-posts"> 79 79 <h1 class="showcase-heading"><?php _e( 'Recent Posts', 'twentyeleven' ); ?></h1> 80 80 81 81 <?php 82 82 83 83 // Display our recent posts, showing full content for the very latest, ignoring Aside posts … … 96 96 $recent = new WP_Query(); 97 97 $recent->query( $recent_args ); 98 98 $counter = 0; 99 99 100 100 while ( $recent->have_posts() ) : $recent->the_post(); 101 101 // set $more to 0 in order to only get the first part of the post 102 102 global $more; 103 $more = 0; 103 $more = 0; 104 104 $counter++; 105 105 106 106 if ( 1 == $counter ) : 107 107 get_template_part( 'content', get_post_format() ); 108 108 echo '<ol class="other-recent-posts">'; 109 109 110 110 else : ?> 111 111 <li class="entry-title"> 112 112 <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> … … 114 114 <?php comments_popup_link( __( '<span class="leave-reply">Leave a reply</span>', 'twentyeleven' ), __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?> 115 115 </span> 116 116 </li> 117 117 118 118 <?php endif; 119 119 endwhile; 120 120 ?> 121 121 122 122 </ol> 123 123 </section> 124 124 125 125 <div class="widget-area" role="complementary"> 126 126 <?php if ( ! dynamic_sidebar( 'sidebar-2' ) ) : ?> 127 127 128 128 <?php 129 129 the_widget( 'Twenty_Eleven_Ephemera_Widget', '', 'before_title=<h1 class="widget-title">&after_title=</h1>' ); 130 ?> 130 ?> 131 131 132 132 <?php endif; // end sidebar widget area ?> 133 133 </div><!-- .widget-area --> -
wp-content/themes/twentyeleven/sidebar.php
25 25 26 26 <?php endif; // end sidebar widget area ?> 27 27 </div><!-- #secondary .widget-area --> 28 29 No newline at end of file -
wp-content/themes/twentyeleven/widgets.php
5 5 * @see http://codex.wordpress.org/Widgets_API#Developing_Widgets 6 6 */ 7 7 class Twenty_Eleven_Ephemera_Widget extends WP_Widget { 8 8 9 9 /** 10 10 * Constructor 11 11 * … … 15 15 $widget_ops = array( 'classname' => 'widget_twentyeleven_ephemera', 'description' => __( 'Use this widget to list your recent Aside and Link posts', 'twentyeleven' ) ); 16 16 $this->WP_Widget( 'widget_twentyeleven_ephemera', __( 'Twenty Eleven Ephemera', 'twentyeleven' ), $widget_ops ); 17 17 $this->alt_option_name = 'widget_twentyeleven_ephemera'; 18 18 19 19 add_action( 'save_post', array(&$this, 'flush_widget_cache' ) ); 20 20 add_action( 'deleted_post', array(&$this, 'flush_widget_cache' ) ); 21 21 add_action( 'switch_theme', array(&$this, 'flush_widget_cache' ) ); 22 22 23 23 } 24 24 25 25 /** 26 26 * Outputs the HTML for this widget. 27 27 * 28 * @param array An array of standard parameters for widgets in this theme 29 * @param array An array of settings for this widget instance 28 * @param array An array of standard parameters for widgets in this theme 29 * @param array An array of settings for this widget instance 30 30 * @return void Echoes it's output 31 31 **/ 32 32 function widget( $args, $instance ) { … … 43 43 return; 44 44 } 45 45 46 ob_start(); 46 ob_start(); 47 47 extract( $args, EXTR_SKIP ); 48 48 49 49 $title = apply_filters( 'widget_title', empty($instance['title']) ? __( 'Ephemera' ) : $instance['title'], $instance, $this->id_base); 50 50 51 51 if ( ! isset( $instance['number'] ) ) 52 52 $instance['number'] = '10'; 53 53 54 54 if ( ! $number = absint( $instance['number'] ) ) 55 55 $number = 10; 56 56 … … 73 73 $ephemera->query( $ephemera_args ); 74 74 75 75 if ( $ephemera->have_posts() ) : 76 76 77 77 echo $before_widget; 78 78 echo $before_title; 79 79 echo $title; // Can set this with a widget option, or omit altogether 80 80 echo $after_title; 81 81 82 82 global $post; 83 83 84 84 ?> 85 85 <ol> 86 86 <?php while ( $ephemera->have_posts() ) : $ephemera->the_post(); ?> 87 87 88 88 <?php if ( 'aside' == get_post_format( $post->ID ) ) : ?> 89 89 90 90 <li class="entry-title"> 91 91 <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> 92 92 <span class="comments-link"> 93 93 <?php comments_popup_link( __( '0 <span class="reply">comments →</span>', 'twentyeleven' ), __( '1 <span class="reply">comment →</span>', 'twentyeleven' ), __( '% <span class="reply">comments →</span>', 'twentyeleven' ) ); ?> 94 94 </span> 95 95 </li> 96 96 97 97 <?php elseif ( 'link' == get_post_format( $post->ID ) ) : ?> 98 98 99 99 <li class="entry-title"> 100 100 <?php 101 101 $link_url = get_permalink(); 102 102 103 103 if ( false != twentyeleven_url_grabber() ) 104 104 $link_url = twentyeleven_url_grabber(); 105 105 ?> … … 108 108 <?php comments_popup_link( __( '0 <span class="reply">comments →</span>', 'twentyeleven' ), __( '1 <span class="reply">comment →</span>', 'twentyeleven' ), __( '% <span class="reply">comments →</span>', 'twentyeleven' ) ); ?> 109 109 </span> 110 110 </li> 111 111 112 112 <?php endif; ?> 113 113 114 114 <?php endwhile; ?> 115 115 </ol> 116 116 <?php 117 117 118 118 echo $after_widget; 119 119 120 120 // Reset the global $the_post as this query will have stomped on it 121 121 wp_reset_postdata(); 122 122 … … 143 143 144 144 return $instance; 145 145 } 146 146 147 147 function flush_widget_cache() { 148 148 wp_cache_delete( 'widget_twentyeleven_ephemera', 'widget' ); 149 } 149 } 150 150 151 151 /** 152 152 * Displays the form for this widget on the Widgets page of the WP Admin area.