Make WordPress Core

Changeset 17714


Ignore:
Timestamp:
04/26/2011 06:34:52 PM (16 years ago)
Author:
lancewillett
Message:

Twenty Eleven: strip trailing spaces, props kawauso - see #17198

Location:
trunk/wp-content/themes/twentyeleven
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyeleven/author.php

    r17669 r17714  
    3232                                        </div><!-- #author-description  -->
    3333                                </div><!-- #entry-author-info -->
    34                                 <?php endif; ?>                                                         
     34                                <?php endif; ?>
    3535
    3636                                <?php /* Start the Loop */ ?>
  • trunk/wp-content/themes/twentyeleven/content-gallery.php

    r17669 r17714  
    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
    … …  
    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"',
  • trunk/wp-content/themes/twentyeleven/content-link.php

    r17669 r17714  
    1212                        <?php if ( 'post' == $post->post_type ) : ?>
    1313                        <?php endif; ?>
    14                        
     14
    1515                        <?php if ( comments_open() ) : ?>
    1616                        <div class="comments-link">
  • trunk/wp-content/themes/twentyeleven/content-single.php

    r17669 r17714  
    2929        </div><!-- .entry-content -->
    3030
    31         <footer class="entry-meta">             
     31        <footer class="entry-meta">
    3232                <?php
    3333                        $tag_list = get_the_tag_list( '', ', ' );
    … …  
    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">
  • trunk/wp-content/themes/twentyeleven/content.php

    r17669 r17714  
    2424                        </div><!-- .entry-meta -->
    2525                        <?php endif; ?>
    26                        
     26
    2727                        <?php if ( comments_open() ) : ?>
    2828                        <div class="comments-link">
    … …  
    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 -->
  • trunk/wp-content/themes/twentyeleven/footer.php

    r17669 r17714  
    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(); ?>>
    … …  
    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' ) ) : ?>
    … …  
    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' ) ) : ?>
    … …  
    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' ); ?>
  • trunk/wp-content/themes/twentyeleven/functions.php

    r17669 r17714  
    286286                'after_title' => '</h1>',
    287287        ) );
    288        
     288
    289289        register_sidebar( array(
    290290                'name' => __( 'Footer Area Two', 'twentyeleven' ),
    … …  
    296296                'after_title' => '</h1>',
    297297        ) );
    298        
     298
    299299        register_sidebar( array(
    300300                'name' => __( 'Footer Area Three', 'twentyeleven' ),
    … …  
    306306                'after_title' => '</h1>',
    307307        ) );
    308        
    309308}
    310309add_action( 'init', 'twentyeleven_widgets_init' );
    … …  
    356355function twentyeleven_footer_sidebar_class() {
    357356        $count = 0;
    358        
     357
    359358        if ( is_active_sidebar( 'sidebar-3' ) )
    360359                $count++;
    … …  
    365364        if ( is_active_sidebar( 'sidebar-5' ) )
    366365                $count++;
    367                
     366
    368367        switch ( $count ) {
    369368                case '1':
    … …  
    378377                        $class = 'three';
    379378                        break;
    380                
     379
    381380                default:
    382381                        $class = '';
    383382                        break;
    384383        }
    385        
     384
    386385        if ( '' != $class )
    387386                echo 'class="' . $class . '"';
    … …  
    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() ),
    … …  
    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
  • trunk/wp-content/themes/twentyeleven/header.php

    r17671 r17714  
    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
  • trunk/wp-content/themes/twentyeleven/image.php

    r17669 r17714  
    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(); ?>>
    … …  
    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
  • trunk/wp-content/themes/twentyeleven/showcase.php

    r17670 r17714  
    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.
    … …  
    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
    … …  
    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
    … …  
    5555                                        }
    5656                                        ?>
    57                                
     57
    5858                                <?php if ( has_post_thumbnail() ) : ?>
    5959                                <section class="featured-post <?php echo $feature_class; ?>">
    … …  
    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
    … …  
    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">
    … …  
    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 ?>
  • trunk/wp-content/themes/twentyeleven/sidebar.php

    r17670 r17714  
    2626                        <?php endif; // end sidebar widget area ?>
    2727                </div><!-- #secondary .widget-area -->
    28                
  • trunk/wp-content/themes/twentyeleven/widgets.php

    r17670 r17714  
    66 */
    77class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
    8        
     8
    99        /**
    1010         * Constructor
    … …  
    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
    … …  
    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         **/
    … …  
    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;
    … …  
    7474
    7575                if ( $ephemera->have_posts() ) :
    76                
     76
    7777                echo $before_widget;
    7878                echo $before_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>
    … …  
    9494                                </span>
    9595                        </li>
    96                        
     96
    9797                        <?php elseif ( 'link' == get_post_format( $post->ID ) ) : ?>
    9898
    … …  
    100100                                <?php
    101101                                        $link_url = get_permalink();
    102                                        
     102
    103103                                        if ( false != twentyeleven_url_grabber() )
    104104                                                $link_url = twentyeleven_url_grabber();
    … …  
    109109                                </span>
    110110                        </li>
    111                        
     111
    112112                        <?php endif; ?>
    113                        
     113
    114114                <?php endwhile; ?>
    115115                </ol>
    … …  
    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();
    … …  
    144144                return $instance;
    145145        }
    146        
     146
    147147        function flush_widget_cache() {
    148148                wp_cache_delete( 'widget_twentyeleven_ephemera', 'widget' );
    149         }       
     149        }
    150150
    151151        /**
Note: See TracChangeset for help on using the changeset viewer.