Make WordPress Core

Ticket #13198: 13198-attachment.php.patch

File 13198-attachment.php.patch, 35.4 KB (added by zeo, 15 years ago)

Miscellaneous. Whitespace, coding standard?, enhancement, i18n

  • wp-content/themes/twentyten/footer.php

     
    2323                        </div>
    2424
    2525                        <div id="site-generator">
    26                                 <?php do_action('twentyten_credits' ); ?>
     26                                <?php do_action( 'twentyten_credits' ); ?>
    2727                                <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>
    2828                        </div>
    2929
  • wp-content/themes/twentyten/author.php

     
    1515
    1616<?php the_post(); ?>
    1717
    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>
    1919
    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( __( 'About %s', 'twentyten' ), get_the_author() ); ?></h2>
    27                                                         <?php the_author_meta( 'description' ); ?>
    28                                                 </div><!-- #author-description  -->
    29                                         </div><!-- .entry-author-info -->
     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 -->
    3030<?php endif; ?>
    3131
    32 <?php rewind_posts(); ?>
     32                                <?php rewind_posts(); ?>
    3333
    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
    4142                        </div><!-- #content -->
    4243                </div><!-- #container -->
    4344
  • wp-content/themes/twentyten/sidebar-footer.php

     
    1717        ) :
    1818?>
    1919                        <div id="footer-widget-area">
     20
    2021<?php if ( is_active_sidebar( 'first-footer-widget-area' ) ) : ?>
    2122                                        <div id="first" class="widget-area">
    2223                                                <ul class="xoxo">
  • wp-content/themes/twentyten/search.php

     
    1414                        <div id="content">
    1515
    1616<?php if ( have_posts() ) : ?>
     17
    1718                                <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyten' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
     19
    1820                                <?php
    1921                                /* Run the loop for the search to output the results.
    2022                                 * If you want to overload this in a child theme then include a file
    2123                                 * called loop-search.php and that will be used instead.
    2224                                 */
    23                                  get_template_part( 'loop', 'search' );
     25                                        get_template_part( 'loop', 'search' );
    2426                                ?>
     27
    2528<?php else : ?>
     29
    2630                                <div id="post-0" class="post no-results not-found">
    2731                                        <h2 class="entry-title"><?php _e( 'Nothing Found', 'twentyten' ); ?></h2>
    2832                                        <div class="entry-content">
     
    3034                                                <?php get_search_form(); ?>
    3135                                        </div><!-- .entry-content -->
    3236                                </div>
     37
    3338<?php endif; ?>
     39
    3440                        </div><!-- #content -->
    3541                </div><!-- #container -->
    3642
  • wp-content/themes/twentyten/404.php

     
    2323
    2424                </div><!-- #content -->
    2525        </div><!-- #container -->
     26
    2627        <script type="text/javascript">
    2728                // focus on search field after it has loaded
    28                 document.getElementById('s') && document.getElementById('s').focus();
     29                document.getElementById( 's' ) && document.getElementById( 's' ).focus();
    2930        </script>
    3031
    31 <?php get_footer(); ?>
    32  No newline at end of file
     32<?php get_footer(); ?>
  • wp-content/themes/twentyten/index.php

     
    1919                <div id="container">
    2020                        <div id="content">
    2121
    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
    2930                        </div><!-- #content -->
    3031                </div><!-- #container -->
    3132
  • wp-content/themes/twentyten/functions.php

     
    5050/** Tell WordPress to run twentyten_setup() when the 'after_setup_theme' hook is run. */
    5151add_action( 'after_setup_theme', 'twentyten_setup' );
    5252
    53 if ( ! function_exists('twentyten_setup') ):
     53if ( ! function_exists( 'twentyten_setup' ) ):
    5454/**
    5555 * Sets up theme defaults and registers support for various WordPress features.
    5656 *
     
    121121        // ... and thus ends the changeable header business.
    122122
    123123        // 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(
    126126                        'url' => '%s/images/headers/berries.jpg',
    127127                        'thumbnail_url' => '%s/images/headers/berries-thumbnail.jpg',
    128128                        'description' => __( 'Berries', 'twentyten' )
    129129                ),
    130                 'cherryblossom' => array (
     130                'cherryblossom' => array(
    131131                        'url' => '%s/images/headers/cherryblossoms.jpg',
    132132                        'thumbnail_url' => '%s/images/headers/cherryblossoms-thumbnail.jpg',
    133133                        'description' => __( 'Cherry Blossoms', 'twentyten' )
    134134                ),
    135                 'concave' => array (
     135                'concave' => array(
    136136                        'url' => '%s/images/headers/concave.jpg',
    137137                        'thumbnail_url' => '%s/images/headers/concave-thumbnail.jpg',
    138138                        'description' => __( 'Concave', 'twentyten' )
    139139                ),
    140                 'fern' => array (
     140                'fern' => array(
    141141                        'url' => '%s/images/headers/fern.jpg',
    142142                        'thumbnail_url' => '%s/images/headers/fern-thumbnail.jpg',
    143143                        'description' => __( 'Fern', 'twentyten' )
    144144                ),
    145                 'forestfloor' => array (
     145                'forestfloor' => array(
    146146                        'url' => '%s/images/headers/forestfloor.jpg',
    147147                        'thumbnail_url' => '%s/images/headers/forestfloor-thumbnail.jpg',
    148148                        'description' => __( 'Forest Floor', 'twentyten' )
    149149                ),
    150                 'inkwell' => array (
     150                'inkwell' => array(
    151151                        'url' => '%s/images/headers/inkwell.jpg',
    152152                        'thumbnail_url' => '%s/images/headers/inkwell-thumbnail.jpg',
    153153                        'description' => __( 'Inkwell', 'twentyten' )
    154154                ),
    155                 'path' => array (
     155                'path' => array(
    156156                        'url' => '%s/images/headers/path.jpg',
    157157                        'thumbnail_url' => '%s/images/headers/path-thumbnail.jpg',
    158158                        'description' => __( 'Path', 'twentyten' )
    159159                ),
    160                 'sunset' => array (
     160                'sunset' => array(
    161161                        'url' => '%s/images/headers/sunset.jpg',
    162162                        'thumbnail_url' => '%s/images/headers/sunset-thumbnail.jpg',
    163163                        'description' => __( 'Sunset', 'twentyten' )
     
    200200function twentyten_the_page_number() {
    201201        global $paged; // Contains page number.
    202202        if ( $paged >= 2 )
    203                 echo ' | ' . sprintf( __( 'Page %s' , 'twentyten' ), $paged );
     203                echo ' | ' . sprintf( __( 'Page %s', 'twentyten' ), $paged );
    204204}
    205205endif;
    206206
     
    227227 * @return string A pretty 'Continue reading' link.
    228228 */
    229229function twentyten_excerpt_more( $more ) {
    230         return ' &hellip; <a href="'. get_permalink() . '">' . __('Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten') . '</a>';
     230        return ' &hellip; <a href="'. get_permalink() . '">' . __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) . '</a>';
    231231}
    232232add_filter( 'excerpt_more', 'twentyten_excerpt_more' );
    233233
     
    255255 * @since 3.0.0
    256256 */
    257257function twentyten_comment( $comment, $args, $depth ) {
    258         $GLOBALS ['comment'] = $comment; ?>
     258        $GLOBALS [ 'comment' ] = $comment; ?>
    259259        <?php if ( '' == $comment->comment_type ) : ?>
    260260        <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
    261261                <div id="comment-<?php comment_ID(); ?>">
     
    273273                <div class="comment-body"><?php comment_text(); ?></div>
    274274
    275275                <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' ] ) ) ); ?>
    277277                </div>
    278278        </div>
    279279
    280280        <?php else : ?>
    281281        <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>
    283283        <?php endif;
    284284}
    285285endif;
     
    293293 */
    294294function twentyten_widgets_init() {
    295295        // Area 1
    296         register_sidebar( array (
     296        register_sidebar( array(
    297297                'name' => __( 'Primary Widget Area', 'twentyten' ),
    298298                'id' => 'primary-widget-area',
    299299                'description' => __( 'The primary widget area', 'twentyten' ),
     
    304304        ) );
    305305
    306306        // Area 2
    307         register_sidebar( array (
     307        register_sidebar( array(
    308308                'name' => __( 'Secondary Widget Area', 'twentyten' ),
    309309                'id' => 'secondary-widget-area',
    310310                'description' => __( 'The secondary widget area', 'twentyten' ),
    311311                'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
    312                 'after_widget' => "</li>",
     312                'after_widget' => '</li>',
    313313                'before_title' => '<h3 class="widget-title">',
    314314                'after_title' => '</h3>',
    315315        ) );
    316316
    317317        // Area 3
    318         register_sidebar( array (
     318        register_sidebar( array(
    319319                'name' => __( 'First Footer Widget Area', 'twentyten' ),
    320320                'id' => 'first-footer-widget-area',
    321321                'description' => __( 'The first footer widget area', 'twentyten' ),
    322322                'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
    323                 'after_widget' => "</li>",
     323                'after_widget' => '</li>',
    324324                'before_title' => '<h3 class="widget-title">',
    325325                'after_title' => '</h3>',
    326326        ) );
    327327
    328328        // Area 4
    329         register_sidebar( array (
     329        register_sidebar( array(
    330330                'name' => __( 'Second Footer Widget Area', 'twentyten' ),
    331331                'id' => 'second-footer-widget-area',
    332332                'description' => __( 'The second footer widget area', 'twentyten' ),
    333333                'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
    334                 'after_widget' => "</li>",
     334                'after_widget' => '</li>',
    335335                'before_title' => '<h3 class="widget-title">',
    336336                'after_title' => '</h3>',
    337337        ) );
     
    342342                'id' => 'third-footer-widget-area',
    343343                'description' => __( 'The third footer widget area', 'twentyten' ),
    344344                'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
    345                 'after_widget' => "</li>",
     345                'after_widget' => '</li>',
    346346                'before_title' => '<h3 class="widget-title">',
    347347                'after_title' => '</h3>',
    348348        ) );
    349349
    350350        // Area 6
    351         register_sidebar( array (
     351        register_sidebar( array(
    352352                'name' => __( 'Fourth Footer Widget Area', 'twentyten' ),
    353353                'id' => 'fourth-footer-widget-area',
    354354                'description' => __( 'The fourth footer widget area', 'twentyten' ),
    355355                'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
    356                 'after_widget' => "</li>",
     356                'after_widget' => '</li>',
    357357                'before_title' => '<h3 class="widget-title">',
    358358                'after_title' => '</h3>',
    359359        ) );
     
    365365 */
    366366function twentyten_remove_recent_comments_style() {
    367367        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' ) );
    369369}
    370370add_action( 'widgets_init', 'twentyten_remove_recent_comments_style' );
    371371
     
    374374 */
    375375function twentyten_get_next_attachment_url() {
    376376        global $post;
    377         $post = get_post($post);
     377        $post = get_post( $post );
    378378        $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' ) ) );
    379379 
    380380        foreach ( $attachments as $k => $attachment ) {
     
    386386                return get_attachment_link( $attachments[ $k ]->ID );
    387387        else
    388388                return get_permalink( $post->post_parent );
    389 }
    390  No newline at end of file
     389}
  • wp-content/themes/twentyten/loop.php

     
    3636<?php while ( have_posts() ) : the_post(); ?>
    3737
    3838<?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' ) ) ) : ?>
    4040                <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    4141                        <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>
    4242
    4343                        <div class="entry-meta">
    4444                                <?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' ),
    4646                                                get_permalink(),
    4747                                                esc_attr( get_the_time() ),
    4848                                                get_the_date(),
     
    5454                        </div><!-- .entry-meta -->
    5555
    5656                        <div class="entry-content">
    57                                 <div class="gallery-thumb">
    58                                         <a class="size-thumbnail" href="<?php the_permalink(); ?>"><?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                                         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>
    6464                                </div>
    6565                                <p><em><?php printf( __( 'This gallery contains <a %1$s>%2$s photos</a>.', 'twentyten' ),
    6666                                                'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"',
     
    7676                                        $category_link = get_category_link( $category_id );
    7777                                ?>
    7878                                <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>
    8080                                <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
    8181                                <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
    8282                        </div><!-- #entry-utility -->
    8383                </div>
    8484
    8585<?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' ) ) ) : ?>
    8787                <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    8888        <?php if ( is_archive() || is_search() ) : // Only display Excerpts for archives & search ?>
    8989                        <div class="entry-summary">
     
    9797
    9898                        <div class="entry-utility">
    9999                                <?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' ),
    101101                                                get_permalink(),
    102102                                                esc_attr( get_the_time() ),
    103103                                                get_the_date(),
     
    106106                                                get_the_author()
    107107                                        );
    108108                                ?>
    109                                 <span class="meta-sep"> | </span>
     109                                <span class="meta-sep">|</span>
    110110                                <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
    111111                                <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
    112112                        </div><!-- #entry-utility -->
     
    119119
    120120                        <div class="entry-meta">
    121121                                <?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' ),
    123123                                                get_permalink(),
    124124                                                esc_attr( get_the_time() ),
    125125                                                get_the_date(),
     
    142142        <?php endif; ?>
    143143
    144144                        <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>' ); ?>
    148148                                <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
    149149                                <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
    150150                        </div><!-- #entry-utility -->
  • wp-content/themes/twentyten/tag.php

     
    1515
    1616<?php the_post(); ?>
    1717
    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>
    2119
    22 <?php rewind_posts(); ?>
     20                                <?php rewind_posts(); ?>
    2321
    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
    3130                        </div><!-- #content -->
    3231                </div><!-- #container -->
    3332
  • wp-content/themes/twentyten/category.php

     
    1313                <div id="container">
    1414                        <div id="content">
    1515
    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>
    2017
     18                                <?php
     19                                        $categorydesc = category_description();
     20                                        if ( ! empty( $categorydesc ) ) echo apply_filters( 'archive_meta', '<div class="archive-meta">' . $categorydesc . '</div>' );
     21                                ?>
     22
    2123                                <?php
    2224                                /* Run the loop for the category page to output the posts.
    2325                                 * If you want to overload this in a child theme then include a file
    2426                                 * called loop-category.php and that will be used instead.
    2527                                 */
    26                                 get_template_part( 'loop', 'category' );
     28                                        get_template_part( 'loop', 'category' );
    2729                                ?>
    2830
    2931                        </div><!-- #content -->
  • wp-content/themes/twentyten/archive.php

     
    2020
    2121<?php the_post(); ?>
    2222
     23                                <h1 class="page-title">
    2324<?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() ); ?>
    2526<?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') ); ?>
    2728<?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') ); ?>
    2930<?php else : ?>
    30                                 <h1 class="page-title"><?php _e( 'Blog Archives', 'twentyten' ); ?></h1>
     31                                <?php _e( 'Blog Archives', 'twentyten' ); ?>
    3132<?php endif; ?>
     33                                </h1>
    3234
    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(); ?>
    4136
     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
    4245                        </div><!-- #content -->
    4346                </div><!-- #container -->
    4447
  • wp-content/themes/twentyten/single.php

     
    2424                                        <h1 class="entry-title"><?php the_title(); ?></h1>
    2525
    2626                                        <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                                                ?>
    3137                                        </div><!-- .entry-meta -->
    3238
    3339                                        <div class="entry-content">
     
    4147                                                        <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?>
    4248                                                </div><!-- #author-avatar -->
    4349                                                <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>
    4551                                                        <?php the_author_meta( 'description' ); ?>
    4652                                                        <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(); ?> &rarr;</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 &rarr;', 'twentyten' ), get_the_author() ); ?></a>
    4854                                                        </div><!-- #author-link -->
    4955                                                </div><!-- #author-description -->
    5056                                        </div><!-- .entry-author-info -->
     
    5258
    5359                                        <div class="entry-utility">
    5460                                        <?php
    55                                                 $tag_list = get_the_tag_list('', ', ');
     61                                                $tag_list = get_the_tag_list( '', ', ' );
    5662                                                if ( '' != $tag_list ) {
    5763                                                        $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' );
    5864                                                } else {
     
    6773                                                );
    6874                                        ?>
    6975
    70 <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
     76                                        <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
    7177                                        </div><!-- .entry-utility -->
    7278                                </div><!-- #post-<?php the_ID(); ?> -->
    7379
  • wp-content/themes/twentyten/comments.php

     
    1616                        <div id="comments">
    1717<?php if ( post_password_required() ) : ?>
    1818                                <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 -->
    2020<?php
    21                 return;
    22         endif;
     21        return;
     22endif;
    2323?>
    2424
    2525<?php
     
    2828
    2929<?php if ( have_comments() ) : ?>
    3030                        <h3 id="comments-title">
    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>
     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>
    3636
    3737<?php if ( get_comment_pages_count() > 1 ) : // are there comments to navigate through ?>
    3838                        <div class="navigation">
     
    5858
    5959<?php else : // if comments are closed ?>
    6060
    61                 <p class="nocomments"><?php _e( 'Comments are closed.', 'twentyten' ); ?></p>
     61                        <p class="nocomments"><?php _e( 'Comments are closed.', 'twentyten' ); ?></p>
    6262
    6363<?php endif; ?>
     64
    6465<?php endif; ?>
    6566
    66 <?php comment_form(); ?>
     67                                <?php comment_form(); ?>
    6768
    68 </div><!-- #comments -->
     69                        </div><!-- #comments -->
  • wp-content/themes/twentyten/header.php

     
    3535        ?></title>
    3636        <link rel="profile" href="http://gmpg.org/xfn/11" />
    3737        <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' ); ?>
    3939        <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    4040        <?php wp_head(); ?>
    4141</head>
     
    4545        <div id="header">
    4646                <div id="masthead">
    4747                        <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>"; ?>
    5352                               
    5453                                <div id="site-description"><?php bloginfo( 'description' ); ?></div>
    5554
     
    5756                                        // Check if this is a post or page, if it has a thumbnail, and if it's a big one
    5857                                        if ( is_singular() &&
    5958                                                        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' ) ) &&
    6160                                                        $image[1] >= HEADER_IMAGE_WIDTH ) :
    6261                                                // Houston, we have a new header image!
    6362                                                echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
  • wp-content/themes/twentyten/attachment.php

     
    2222
    2323                                        <div class="entry-meta">
    2424                                                <?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' ),
    2626                                                                get_author_posts_url( get_the_author_meta( 'ID' ) ),
    2727                                                                sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),
    2828                                                                get_the_author()
    2929                                                        );
    3030                                                ?>
    31                                                 <span class="meta-sep"> | </span>
     31                                                <span class="meta-sep">|</span>
    3232                                                <?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' ),
    3434                                                                esc_attr( get_the_time() ),
    3535                                                                get_the_date()
    3636                                                        );
    3737                                                        if ( wp_attachment_is_image() ) {
    3838                                                                $size = getimagesize( wp_get_attachment_url() );
    39                                                                 printf( __( ' at <a href="%1$s" title="Link to full-size image">%2$s &times; %3$s</a>', 'twentyten'),
     39                                                                printf( __( ' at <a href="%1$s" title="Link to full-size image">%2$s &times; %3$s</a>', 'twentyten' ),
    4040                                                                        wp_get_attachment_url(),
    4141                                                                        $size[0],
    4242                                                                        $size[1]
     
    5050                                                <div class="entry-attachment">
    5151<?php if ( wp_attachment_is_image() ) : ?>
    5252                                                <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',  900 );
     53                                                        $attachment_size = apply_filters( 'twentyten_attachment_size', 900 );
    5454                                                        echo wp_get_attachment_image( $post->ID, array( $attachment_size, 9999 ) ); // filterable image width with, essentially, no limit for image height.
    5555                                                ?></a></p>
    5656
     
    6464                                                </div>
    6565                                                <div class="entry-caption"><?php if ( ! empty( $post->post_excerpt ) ) the_excerpt(); ?></div>
    6666
    67 <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' )  ); ?>
     67<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
    6868<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
    6969
    7070                                        </div><!-- .entry-content -->