Make WordPress Core

Ticket #17198: 17198.whitespace.diff

File 17198.whitespace.diff, 18.3 KB (added by kawauso, 12 years ago)

Remove excessive whitespace

  • wp-content/themes/twentyeleven/author.php

     
    3131                                                <?php the_author_meta( 'description' ); ?>
    3232                                        </div><!-- #author-description  -->
    3333                                </div><!-- #entry-author-info -->
    34                                 <?php endif; ?>                                                         
     34                                <?php endif; ?>
    3535
    3636                                <?php /* Start the Loop */ ?>
    3737                                <?php while ( have_posts() ) : the_post(); ?>
  • wp-content/themes/twentyeleven/content-aside.php

     
    1111
    1212                        <?php if ( 'post' == $post->post_type ) : ?>
    1313                        <?php endif; ?>
    14                        
     14
    1515                        <?php if ( comments_open() ) : ?>
    1616                        <div class="comments-link">
    1717                                <?php comments_popup_link( __( '<span class="leave-reply">Reply</span>', 'twentyeleven' ), __( '1', 'twentyeleven' ), __( '%', 'twentyeleven' ) ); ?>
  • wp-content/themes/twentyeleven/content-gallery.php

     
    3131        <div class="entry-content">
    3232                <?php if ( post_password_required() ) : ?>
    3333                        <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
    34                        
     34
    3535                        <?php else : ?>
    3636                                <?php
    3737                                        $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) );
     
    4444                                <figure class="gallery-thumb">
    4545                                        <a href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a>
    4646                                </figure><!-- .gallery-thumb -->
    47                                
     47
    4848                                <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' ),
    4949                                                'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"',
    5050                                                number_format_i18n( $total_images )
  • wp-content/themes/twentyeleven/content-link.php

     
    1111
    1212                        <?php if ( 'post' == $post->post_type ) : ?>
    1313                        <?php endif; ?>
    14                        
     14
    1515                        <?php if ( comments_open() ) : ?>
    1616                        <div class="comments-link">
    1717                                <?php comments_popup_link( __( '<span class="leave-reply">Reply</span>', 'twentyeleven' ), __( '1', 'twentyeleven' ), __( '%', 'twentyeleven' ) ); ?>
  • wp-content/themes/twentyeleven/content-single.php

     
    2828                <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( '<span>Pages:</span>', 'twentyeleven' ), 'after' => '</div>' ) ); ?>
    2929        </div><!-- .entry-content -->
    3030
    31         <footer class="entry-meta">             
     31        <footer class="entry-meta">
    3232                <?php
    3333                        $tag_list = get_the_tag_list( '', ', ' );
    3434                        if ( '' != $tag_list ) {
     
    4747                        );
    4848                ?>
    4949                <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
    50                
     50
    5151                <?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?>
    5252                <div id="author-info">
    5353                        <div id="author-avatar">
  • wp-content/themes/twentyeleven/content.php

     
    2323                                ?>
    2424                        </div><!-- .entry-meta -->
    2525                        <?php endif; ?>
    26                        
     26
    2727                        <?php if ( comments_open() ) : ?>
    2828                        <div class="comments-link">
    2929                                <?php comments_popup_link( __( '<span class="leave-reply">Reply</span>', 'twentyeleven' ), __( '1', 'twentyeleven' ), __( '%', 'twentyeleven' ) ); ?>
     
    4747                        <span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in ', 'twentyeleven' ); ?></span><?php the_category( ', ' ); ?></span>
    4848                        <?php the_tags( '<span class="sep"> | </span><span class="tag-links">' . __( 'Tagged ', 'twentyeleven' ) . '</span>', ', ', '' ); ?>
    4949                        <?php endif; ?>
    50                        
     50
    5151                        <?php if ( comments_open() ) : ?>
    5252                        <span class="sep"> | </span>
    5353                        <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>
    5454                        <?php endif; ?>
    55                        
     55
    5656                        <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
    5757                </footer><!-- #entry-meta -->
    5858        </article><!-- #post-<?php the_ID(); ?> -->
  • wp-content/themes/twentyeleven/footer.php

     
    88        </div><!-- #main -->
    99
    1010        <footer id="colophon" role="contentinfo">
    11                
     11
    1212                        <?php if ( is_active_sidebar( 'sidebar-3' ) || is_active_sidebar( 'sidebar-4' ) || is_active_sidebar( 'sidebar-5' ) ) : ?>
    1313                        <div id="supplementary" <?php twentyeleven_footer_sidebar_class(); ?>>
    1414                                <?php if ( is_active_sidebar( 'sidebar-3' ) ) : ?>
    1515                                <div id="first" class="widget-area" role="complementary">
    1616                                        <?php dynamic_sidebar( 'sidebar-3' ); ?>
    1717                                </div><!-- #first .widget-area -->
    18                                 <?php endif; ?>                         
     18                                <?php endif; ?>
    1919
    2020                                <?php if ( is_active_sidebar( 'sidebar-4' ) ) : ?>
    2121                                <div id="second" class="widget-area" role="complementary">
    2222                                        <?php dynamic_sidebar( 'sidebar-4' ); ?>
    2323                                </div><!-- #second .widget-area -->
    24                                 <?php endif; ?>                         
     24                                <?php endif; ?>
    2525
    2626                                <?php if ( is_active_sidebar( 'sidebar-5' ) ) : ?>
    2727                                <div id="third" class="widget-area" role="complementary">
    2828                                        <?php dynamic_sidebar( 'sidebar-5' ); ?>
    2929                                </div><!-- #third .widget-area -->
    30                                 <?php endif; ?>                         
     30                                <?php endif; ?>
    3131                        </div><!-- #supplementary -->
    3232                        <?php endif; ?>
    33                
     33
    3434                        <div id="site-generator">
    3535                                <a href="http://wordpress.org/" rel="generator">Proudly powered by WordPress</a><span class="sep"> | </span><?php printf( __( 'Theme: %1$s.', 'twentyeleven' ), 'Twenty Eleven' ); ?>
    3636                        </div>
  • wp-content/themes/twentyeleven/functions.php

     
    285285                'before_title' => '<h1 class="widget-title">',
    286286                'after_title' => '</h1>',
    287287        ) );
    288        
     288
    289289        register_sidebar( array(
    290290                'name' => __( 'Footer Area Two', 'twentyeleven' ),
    291291                'id' => 'sidebar-4',
     
    295295                'before_title' => '<h1 class="widget-title">',
    296296                'after_title' => '</h1>',
    297297        ) );
    298        
     298
    299299        register_sidebar( array(
    300300                'name' => __( 'Footer Area Three', 'twentyeleven' ),
    301301                'id' => 'sidebar-5',
     
    305305                'before_title' => '<h1 class="widget-title">',
    306306                'after_title' => '</h1>',
    307307        ) );
    308        
    309308}
    310309add_action( 'init', 'twentyeleven_widgets_init' );
    311310
     
    355354 */
    356355function twentyeleven_footer_sidebar_class() {
    357356        $count = 0;
    358        
     357
    359358        if ( is_active_sidebar( 'sidebar-3' ) )
    360359                $count++;
    361360
     
    364363
    365364        if ( is_active_sidebar( 'sidebar-5' ) )
    366365                $count++;
    367                
     366
    368367        switch ( $count ) {
    369368                case '1':
    370369                        $class = 'one';
     
    377376                case '3':
    378377                        $class = 'three';
    379378                        break;
    380                
     379
    381380                default:
    382381                        $class = '';
    383382                        break;
    384383        }
    385        
     384
    386385        if ( '' != $class )
    387386                echo 'class="' . $class . '"';
    388387}
     
    411410                                                $avatar_size = 68;
    412411                                                if ( '0' != $comment->comment_parent )
    413412                                                        $avatar_size = 39;
    414                                                        
     413
    415414                                                echo get_avatar( $comment, $avatar_size );
    416                                        
     415
    417416                                                printf( __( '%1$s on %2$s%3$s at %4$s%5$s <span class="says">said:</span>', 'twentyeleven' ),
    418417                                                        sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ),
    419418                                                        '<a href="' . esc_url( get_comment_link( $comment->comment_ID ) ) . '"><time pubdate datetime="' . get_comment_time( 'c' ) . '">',
    420419                                                        get_comment_date(),
    421420                                                        get_comment_time(),
    422                                                         '</time></a>'                                                   
     421                                                        '</time></a>'
    423422                                                );
    424423                                        ?>
    425                                        
    426                                         <?php edit_comment_link( __( '[Edit]', 'twentyeleven' ), ' ' ); ?>                                     
     424
     425                                        <?php edit_comment_link( __( '[Edit]', 'twentyeleven' ), ' ' ); ?>
    427426                                </div><!-- .comment-author .vcard -->
    428427
    429428                                <?php if ( $comment->comment_approved == '0' ) : ?>
  • wp-content/themes/twentyeleven/header.php

     
    5252                                <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>
    5353                                <h2 id="site-description"><?php bloginfo( 'description' ); ?></h2>
    5454                        </hgroup>
    55                        
     55
    5656                        <?php
    5757                                // Check to see if the header image has been removed
    5858                                if ( get_header_image() != '' ) :
  • wp-content/themes/twentyeleven/image.php

     
    1010                        <div id="content" role="main">
    1111
    1212                        <?php the_post(); ?>
    13                        
     13
    1414                        <nav id="nav-single">
    1515                                <span class="nav-previous"><?php previous_image_link( false, __( '&larr; Previous' , 'twentyeleven' ) ); ?></span>
    1616                                <span class="nav-next"><?php next_image_link( false, __( 'Next &rarr;' , 'twentyeleven' ) ); ?></span>
    17                         </nav><!-- #nav-single -->                     
     17                        </nav><!-- #nav-single -->
    1818
    1919                                <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    2020                                        <header class="entry-header">
     
    7070                                                                $attachment_size = apply_filters( 'theme_attachment_size', 848 );
    7171                                                                echo wp_get_attachment_image( $post->ID, array( $attachment_size, 1024 ) ); // filterable image width with 1024px limit for image height.
    7272                                                                ?></a>
    73                                                                
     73
    7474                                                                <?php if ( ! empty( $post->post_excerpt ) ) : ?>
    7575                                                                <div class="entry-caption">
    7676                                                                        <?php the_excerpt(); ?>
    7777                                                                </div>
    78                                                                 <?php endif; ?>                                                         
     78                                                                <?php endif; ?>
    7979                                                        </div><!-- .attachment -->
    8080
    8181                                                </div><!-- .entry-attachment -->
  • wp-content/themes/twentyeleven/showcase.php

     
    1111
    1212                <div id="primary" class="showcase">
    1313                        <div id="content" role="main">
    14                                
     14
    1515                                <?php the_post(); ?>
    16                                                        
     16
    1717                                <?php
    1818                                        // If we have content for this page, let's display it.
    1919                                        if ( '' != get_the_content() )
    2020                                                get_template_part( 'content', 'intro' );
    2121                                ?>
    22                                
     22
    2323                                <?php
    2424                                        // See if we have any sticky posts and use the latest to create a featured post
    2525                                        $sticky = get_option( 'sticky_posts' );
     
    2727                                                'posts_per_page' => 1,
    2828                                                'post__in' => $sticky,
    2929                                        );
    30                                        
     30
    3131                                        $featured = new WP_Query();
    3232                                        $featured->query( $featured_args );
    33                                
     33
    3434                                        // Let's roll.
    3535                                        if ( $sticky ) :
    36                                        
     36
    3737                                        $featured->the_post();
    38                                        
     38
    3939                                        // We're going to add a class to our featured post for featured images
    4040                                        // by default it'll have no class though
    4141                                        $feature_class = '';
     
    5454                                                }
    5555                                        }
    5656                                        ?>
    57                                
     57
    5858                                <?php if ( has_post_thumbnail() ) : ?>
    5959                                <section class="featured-post <?php echo $feature_class; ?>">
    6060                                <?php else : ?>
     
    6969                                                        <?php } else { ?>
    7070                                                                <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>
    7171                                                        <?php }
    72                                                 }                                       
    73                                         ?>                                     
     72                                                }
     73                                        ?>
    7474                                        <?php get_template_part( 'content', 'featured' ); ?>
    75                                 </section>                                                     
     75                                </section>
    7676                                <?php endif; ?>
    7777
    7878                                <section class="recent-posts">
    7979                                        <h1 class="showcase-heading"><?php _e( 'Recent Posts', 'twentyeleven' ); ?></h1>
    80                                        
     80
    8181                                        <?php
    8282
    8383                                        // Display our recent posts, showing full content for the very latest, ignoring Aside posts
     
    9696                                        $recent = new WP_Query();
    9797                                        $recent->query( $recent_args );
    9898                                        $counter = 0;
    99                                        
     99
    100100                                        while ( $recent->have_posts() ) : $recent->the_post();
    101101                                                // set $more to 0 in order to only get the first part of the post
    102102                                                global $more;
    103                                                 $more = 0;                                     
     103                                                $more = 0;
    104104                                                $counter++;
    105                                                
     105
    106106                                                if ( 1 == $counter ) :
    107107                                                        get_template_part( 'content', get_post_format() );
    108108                                                        echo '<ol class="other-recent-posts">';
    109                                                        
     109
    110110                                                else : ?>
    111111                                                        <li class="entry-title">
    112112                                                                <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>
     
    114114                                                                        <?php comments_popup_link( __( '<span class="leave-reply">Leave a reply</span>', 'twentyeleven' ), __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?>
    115115                                                                </span>
    116116                                                        </li>
    117                                                        
     117
    118118                                                <?php endif;
    119119                                        endwhile;
    120120                                        ?>
    121                                        
     121
    122122                                        </ol>
    123123                                </section>
    124                                
     124
    125125                                <div class="widget-area" role="complementary">
    126126                                        <?php if ( ! dynamic_sidebar( 'sidebar-2' ) ) : ?>
    127                                                
     127
    128128                                                <?php
    129129                                                the_widget( 'Twenty_Eleven_Ephemera_Widget', '', 'before_title=<h1 class="widget-title">&after_title=</h1>' );
    130                                                 ?>                                             
     130                                                ?>
    131131
    132132                                        <?php endif; // end sidebar widget area ?>
    133133                                </div><!-- .widget-area -->
  • wp-content/themes/twentyeleven/sidebar.php

     
    2525
    2626                        <?php endif; // end sidebar widget area ?>
    2727                </div><!-- #secondary .widget-area -->
    28                
    29  No newline at end of file
  • wp-content/themes/twentyeleven/widgets.php

     
    55 * @see http://codex.wordpress.org/Widgets_API#Developing_Widgets
    66 */
    77class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
    8        
     8
    99        /**
    1010         * Constructor
    1111         *
     
    1515                $widget_ops = array( 'classname' => 'widget_twentyeleven_ephemera', 'description' => __( 'Use this widget to list your recent Aside and Link posts', 'twentyeleven' ) );
    1616                $this->WP_Widget( 'widget_twentyeleven_ephemera', __( 'Twenty Eleven Ephemera', 'twentyeleven' ), $widget_ops );
    1717                $this->alt_option_name = 'widget_twentyeleven_ephemera';
    18                
     18
    1919                add_action( 'save_post', array(&$this, 'flush_widget_cache' ) );
    2020                add_action( 'deleted_post', array(&$this, 'flush_widget_cache' ) );
    2121                add_action( 'switch_theme', array(&$this, 'flush_widget_cache' ) );
    22                
     22
    2323        }
    2424
    2525        /**
    2626         * Outputs the HTML for this widget.
    2727         *
    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
    3030         * @return void Echoes it's output
    3131         **/
    3232        function widget( $args, $instance ) {
     
    4343                        return;
    4444                }
    4545
    46                 ob_start();             
     46                ob_start();
    4747                extract( $args, EXTR_SKIP );
    48                
     48
    4949                $title = apply_filters( 'widget_title', empty($instance['title']) ? __( 'Ephemera' ) : $instance['title'], $instance, $this->id_base);
    50                
     50
    5151                if ( ! isset( $instance['number'] ) )
    5252                        $instance['number'] = '10';
    53                        
     53
    5454                if ( ! $number = absint( $instance['number'] ) )
    5555                        $number = 10;
    5656
     
    7373                $ephemera->query( $ephemera_args );
    7474
    7575                if ( $ephemera->have_posts() ) :
    76                
     76
    7777                echo $before_widget;
    7878                echo $before_title;
    7979                echo $title; // Can set this with a widget option, or omit altogether
    8080                echo $after_title;
    8181
    8282                global $post;
    83                
     83
    8484                ?>
    8585                <ol>
    8686                <?php while ( $ephemera->have_posts() ) : $ephemera->the_post(); ?>
    87                        
     87
    8888                        <?php if ( 'aside' == get_post_format( $post->ID ) ) : ?>
    89                                
     89
    9090                        <li class="entry-title">
    9191                                <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>
    9292                                <span class="comments-link">
    9393                                        <?php comments_popup_link( __( '0 <span class="reply">comments &rarr;</span>', 'twentyeleven' ), __( '1 <span class="reply">comment &rarr;</span>', 'twentyeleven' ), __( '% <span class="reply">comments &rarr;</span>', 'twentyeleven' ) ); ?>
    9494                                </span>
    9595                        </li>
    96                        
     96
    9797                        <?php elseif ( 'link' == get_post_format( $post->ID ) ) : ?>
    9898
    9999                        <li class="entry-title">
    100100                                <?php
    101101                                        $link_url = get_permalink();
    102                                        
     102
    103103                                        if ( false != twentyeleven_url_grabber() )
    104104                                                $link_url = twentyeleven_url_grabber();
    105105                                ?>
     
    108108                                        <?php comments_popup_link( __( '0 <span class="reply">comments &rarr;</span>', 'twentyeleven' ), __( '1 <span class="reply">comment &rarr;</span>', 'twentyeleven' ), __( '% <span class="reply">comments &rarr;</span>', 'twentyeleven' ) ); ?>
    109109                                </span>
    110110                        </li>
    111                        
     111
    112112                        <?php endif; ?>
    113                        
     113
    114114                <?php endwhile; ?>
    115115                </ol>
    116116                <?php
    117117
    118118                echo $after_widget;
    119                
     119
    120120                // Reset the global $the_post as this query will have stomped on it
    121121                wp_reset_postdata();
    122122
     
    143143
    144144                return $instance;
    145145        }
    146        
     146
    147147        function flush_widget_cache() {
    148148                wp_cache_delete( 'widget_twentyeleven_ephemera', 'widget' );
    149         }       
     149        }
    150150
    151151        /**
    152152         * Displays the form for this widget on the Widgets page of the WP Admin area.