WordPress.org

Make WordPress Core

Changeset 13720


Ignore:
Timestamp:
03/16/2010 08:17:22 PM (11 years ago)
Author:
iammattthomas
Message:

Coding standards cleanup in twentyten, see #9015. Props sivel

Location:
trunk/wp-content/themes/twentyten
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyten/attachment.php

    r13498 r13720  
    66<?php the_post(); ?>
    77
    8                 <p class="page-title"><a href="<?php echo get_permalink($post->post_parent); ?>" title="<?php printf( esc_attr__( 'Return to %s', 'twentyten' ), esc_html( get_the_title($post->post_parent), 1 ) ); ?>" rel="gallery">&larr; <?php echo get_the_title($post->post_parent); ?></a></p>
     8                <p class="page-title"><a href="<?php echo get_permalink( $post->post_parent ); ?>" title="<?php printf( esc_attr__( 'Return to %s', 'twentyten' ), esc_html( get_the_title( $post->post_parent ), 1 ) ); ?>" rel="gallery">&larr; <?php echo get_the_title( $post->post_parent ); ?></a></p>
    99
    1010                <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
     
    1414                        <?php
    1515                            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'),
    16                                 get_author_posts_url( get_the_author_meta('ID') ),
     16                                get_author_posts_url( get_the_author_meta( 'ID' ) ),
    1717                                sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),
    1818                                get_the_author()
     
    2222                        <?php
    2323                            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'),
    24                                 esc_attr(get_the_time()),
     24                                esc_attr( get_the_time() ),
    2525                                get_the_date()
    2626                            );
     
    4444<?php endif; ?>
    4545                        </div>
    46                         <div class="entry-caption"><?php if ( !empty($post->post_excerpt) ) the_excerpt(); ?></div>
     46                        <div class="entry-caption"><?php if ( ! empty( $post->post_excerpt ) ) the_excerpt(); ?></div>
    4747
    4848<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' )  ); ?>
     
    6161                        printf(
    6262                            $utility_text,
    63                             get_the_category_list(', '),
     63                            get_the_category_list( ', ' ),
    6464                            $tag_list,
    6565                            get_permalink(),
    66                             the_title_attribute('echo=0'),
     66                            the_title_attribute( 'echo=0' ),
    6767                            get_post_comments_feed_link()
    6868                        );
     
    7171<?php if ( comments_open() && pings_open() ) : // Comments and trackbacks open ?>
    7272                        <?php printf( __( '<a class="comment-link" href="#respond" title="Post a comment">Post a comment</a> or leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'twentyten' ), get_trackback_url() ); ?>
    73 <?php elseif ( !comments_open() && pings_open() ) : // Only trackbacks open ?>
     73<?php elseif ( ! comments_open() && pings_open() ) : // Only trackbacks open ?>
    7474                        <?php printf( __( 'Comments are closed, but you can leave a trackback: <a class="trackback-link" href="%s" title="Trackback URL for your post" rel="trackback">Trackback URL</a>.', 'twentyten' ), get_trackback_url() ); ?>
    75 <?php elseif ( comments_open() && !pings_open() ) : // Only comments open ?>
     75<?php elseif ( comments_open() && ! pings_open() ) : // Only comments open ?>
    7676                        <?php _e( 'Trackbacks are closed, but you can <a class="comment-link" href="#respond" title="Post a comment">post a comment</a>.', 'twentyten' ); ?>
    77 <?php elseif ( !comments_open() && !pings_open() ) : // Comments and trackbacks closed ?>
     77<?php elseif ( ! comments_open() && ! pings_open() ) : // Comments and trackbacks closed ?>
    7878                        <?php _e( 'Both comments and trackbacks are currently closed.', 'twentyten' ); ?>
    7979<?php endif; ?>
  • trunk/wp-content/themes/twentyten/author.php

    r13147 r13720  
    66<?php the_post(); ?>
    77
    8                 <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>
     8                <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>
    99
    10 <?php if ( get_the_author_meta('description') ) : // If a user has filled out their decscription show a bio on their entries  ?>
     10<?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their decscription show a bio on their entries  ?>
    1111                    <div id="entry-author-info">
    1212                        <div id="author-avatar">
    13                             <?php echo get_avatar( get_the_author_meta('user_email'), apply_filters('twentyten_author_bio_avatar_size', 60) ); ?>
     13                            <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?>
    1414                        </div><!-- #author-avatar   -->
    1515                        <div id="author-description">
    16                             <h2><?php printf(__('About %s', 'twentyten'), get_the_author()); ?></h2>
    17                             <?php the_author_meta('description'); ?>
     16                            <h2><?php printf( __( 'About %s', 'twentyten' ), get_the_author() ); ?></h2>
     17                            <?php the_author_meta( 'description' ); ?>
    1818                        </div><!-- #author-description  -->
    1919                    </div><!-- .entry-author-info -->
  • trunk/wp-content/themes/twentyten/category.php

    r13498 r13720  
    55
    66                <h1 class="page-title"><?php
    7                     printf(__( 'Category Archives: %s', 'twentyten' ), '<span>' . single_cat_title('', false) . '</span>');
     7                    printf( __( 'Category Archives: %s', 'twentyten' ), '<span>' . single_cat_title( '', false ) . '</span>' );
    88                ?></h1>
    9                 <?php $categorydesc = category_description(); if ( !empty($categorydesc) ) echo apply_filters( 'archive_meta', '<div class="archive-meta">' . $categorydesc . '</div>' ); ?>
     9                <?php $categorydesc = category_description(); if ( ! empty( $categorydesc ) ) echo apply_filters( 'archive_meta', '<div class="archive-meta">' . $categorydesc . '</div>' ); ?>
    1010
    1111<?php get_generic_template( 'loop', 'category' ); ?>
  • trunk/wp-content/themes/twentyten/comments.php

    r13498 r13720  
    1414<?php if ( have_comments() ) : ?>
    1515            <h3 id="comments-title"><?php comments_number(
    16                 sprintf(__('No Responses to %s', 'twentyten'), '<em>' . get_the_title() . '</em>'),
    17                 sprintf(__('One Response to %s', 'twentyten'), '<em>' . get_the_title() . '</em>'),
    18                 sprintf(__('%% Responses to %s', 'twentyten'), '<em>' . get_the_title() . '</em>')
     16                sprintf( __( 'No Responses to %s', 'twentyten' ), '<em>' . get_the_title() . '</em>' ),
     17                sprintf( __( 'One Response to %s', 'twentyten' ), '<em>' . get_the_title() . '</em>' ),
     18                sprintf( __( '%% Responses to %s', 'twentyten' ), '<em>' . get_the_title() . '</em>' )
    1919            ); ?> </h3>
    2020
    2121<?php if ( get_comment_pages_count() > 1 ) : // are there comments to navigate through ?>
    2222            <div class="navigation">
    23                 <div class="nav-previous"><?php previous_comments_link( __('&larr; Older Comments', 'twentyten') ); ?></div>
    24                 <div class="nav-next"><?php next_comments_link( __('Newer Comments &rarr;', 'twentyten') ); ?></div>
     23                <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyten' ) ); ?></div>
     24                <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyten' ) ); ?></div>
    2525            </div>
    2626<?php endif; // check for comment navigation ?>
    2727
    2828            <ol class="commentlist">
    29                 <?php wp_list_comments( array('callback' => 'twentyten_comment') ); ?>
     29                <?php wp_list_comments( array( 'callback' => 'twentyten_comment' ) ); ?>
    3030            </ol>
    3131
    3232<?php if ( get_comment_pages_count() > 1 ) : // are there comments to navigate through ?>
    3333            <div class="navigation">
    34                 <div class="nav-previous"><?php previous_comments_link( __('&larr; Older Comments', 'twentyten') ); ?></div>
    35                 <div class="nav-next"><?php next_comments_link( __('Newer Comments &rarr;', 'twentyten') ); ?></div>
     34                <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyten' ) ); ?></div>
     35                <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyten' ) ); ?></div>
    3636            </div>
    3737<?php endif; // check for comment navigation ?>
     
    4343<?php else : // if comments are closed ?>
    4444
    45         <p class="nocomments"><?php _e('Comments are closed.', 'twentyten'); ?></p>
     45        <p class="nocomments"><?php _e( 'Comments are closed.', 'twentyten' ); ?></p>
    4646
    4747<?php endif; ?>
  • trunk/wp-content/themes/twentyten/footer.php

    r13141 r13720  
    77
    88            <div id="site-info">
    9                 <a href="<?php echo home_url('/') ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
     9                <a href="<?php echo home_url( '/' ) ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
    1010            </div>
    1111
    1212            <div id="site-generator">
    13                 <?php printf( __('Proudly powered by <span id="generator-link">%s</span>.', 'twentyten'), '<a href="http://wordpress.org/" title="' . esc_attr__( 'Semantic Personal Publishing Platform', 'twentyten' ) . '" rel="generator">' . __( 'WordPress', 'twentyten' ) . '</a>' ); ?>
     13                <?php printf( __( 'Proudly powered by <span id="generator-link">%s</span>.', 'twentyten' ), '<a href="http://wordpress.org/" title="' . esc_attr__( 'Semantic Personal Publishing Platform', 'twentyten' ) . '" rel="generator">' . __( 'WordPress', 'twentyten' ) . '</a>' ); ?>
    1414            </div>
    1515
  • trunk/wp-content/themes/twentyten/functions.php

    r13552 r13720  
    99    // Your Changeable header business starts here
    1010    // No CSS, just IMG call
    11     define( 'HEADER_TEXTCOLOR', '');
    12     define( 'HEADER_IMAGE', '%s/images/headers/forestfloor.jpg'); // %s is theme dir uri
     11    define( 'HEADER_TEXTCOLOR', '' );
     12    define( 'HEADER_IMAGE', '%s/images/headers/forestfloor.jpg' ); // %s is theme dir uri
    1313    define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyten_header_image_width',  940 ) );
    1414    define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyten_header_image_height',  198 ) );
     
    1818    // and thus ends the changeable header business
    1919
    20     register_default_headers( array('berries' => array('url' => '%s/images/headers/berries.jpg', 'thumbnail_url' => '%s/images/headers/berries-thumbnail.jpg', 'description' => __('Berries')),
    21                                     'cherryblossom' => array( 'url' => '%s/images/headers/cherryblossoms.jpg', 'thumbnail_url' => '%s/images/headers/cherryblossoms-thumbnail.jpg', 'description' => __('Cherry Blossoms')),
    22                                     'concave' => array('url' => '%s/images/headers/concave.jpg', 'thumbnail_url' => '%s/images/headers/concave-thumbnail.jpg', 'description' => __('Concave')),
    23                                     'fern' => array('url' => '%s/images/headers/fern.jpg', 'thumbnail_url' => '%s/images/headers/fern-thumbnail.jpg', 'description' => __('Fern')),
    24                                     'forestfloor' => array('url' => '%s/images/headers/forestfloor.jpg', 'thumbnail_url' => '%s/images/headers/forestfloor-thumbnail.jpg', 'description' => __('Forest Floor')),
    25                                     'inkwell' => array('url' => '%s/images/headers/inkwell.jpg', 'thumbnail_url' => '%s/images/headers/inkwell-thumbnail.jpg', 'description' => __('Ink Well')),
    26                                     'path' => array('url' => '%s/images/headers/path.jpg', 'thumbnail_url' => '%s/images/headers/path-thumbnail.jpg', 'description' => __('Path')),
    27                                     'sunset' => array('url' => '%s/images/headers/sunset.jpg', 'thumbnail_url' => '%s/images/headers/sunset-thumbnail.jpg', 'description' => __('Sunset')) ) );
     20    register_default_headers( array (
     21        'berries' => array (
     22            'url' => '%s/images/headers/berries.jpg',
     23            'thumbnail_url' => '%s/images/headers/berries-thumbnail.jpg',
     24            'description' => __( 'Berries' )
     25        ),
     26        'cherryblossom' => array (
     27            'url' => '%s/images/headers/cherryblossoms.jpg',
     28            'thumbnail_url' => '%s/images/headers/cherryblossoms-thumbnail.jpg',
     29            'description' => __( 'Cherry Blossoms' )
     30        ),
     31        'concave' => array (
     32            'url' => '%s/images/headers/concave.jpg',
     33            'thumbnail_url' => '%s/images/headers/concave-thumbnail.jpg',
     34            'description' => __( 'Concave' )
     35        ),
     36        'fern' => array (
     37            'url' => '%s/images/headers/fern.jpg',
     38            'thumbnail_url' => '%s/images/headers/fern-thumbnail.jpg',
     39            'description' => __( 'Fern' )
     40        ),
     41        'forestfloor' => array (
     42            'url' => '%s/images/headers/forestfloor.jpg',
     43            'thumbnail_url' => '%s/images/headers/forestfloor-thumbnail.jpg',
     44            'description' => __( 'Forest Floor' )
     45        ),
     46        'inkwell' => array (
     47            'url' => '%s/images/headers/inkwell.jpg',
     48            'thumbnail_url' => '%s/images/headers/inkwell-thumbnail.jpg',
     49            'description' => __( 'Ink Well' )
     50        ),
     51        'path' => array (
     52            'url' => '%s/images/headers/path.jpg',
     53            'thumbnail_url' => '%s/images/headers/path-thumbnail.jpg',
     54            'description' => __( 'Path' )
     55        ),
     56        'sunset' => array (
     57            'url' => '%s/images/headers/sunset.jpg',
     58            'thumbnail_url' => '%s/images/headers/sunset-thumbnail.jpg',
     59            'description' => __( 'Sunset' )
     60        )
     61    ) );
    2862
    2963    add_custom_background();
     
    76110if ( ! function_exists( 'twentyten_get_page_number' ) ) :
    77111function twentyten_get_page_number() {
    78     if ( get_query_var('paged') )
    79         return ' | ' . __( 'Page ' , 'twentyten') . get_query_var('paged');
     112    if ( get_query_var( 'paged' ) )
     113        return ' | ' . __( 'Page ' , 'twentyten' ) . get_query_var( 'paged' );
    80114}
    81115endif;
     
    99133// Make a nice read more link on excerpts
    100134if ( ! function_exists( 'twentyten_excerpt_more' ) ) :
    101 function twentyten_excerpt_more($more) {
     135function twentyten_excerpt_more( $more ) {
    102136    return '&nbsp;&hellip; <a href="'. get_permalink() . '">' . 'Continue&nbsp;reading&nbsp;<span class="meta-nav">&rarr;</span>' . '</a>';
    103137}
     
    122156        <?php endif; ?>
    123157
    124         <div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"><?php printf( __( '%1$s at %2$s' ), get_comment_date(),  get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'twentyten' ),'  ','' ); ?></div>
     158        <div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"><?php printf( __( '%1$s at %2$s' ), get_comment_date(), get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'twentyten' ),'  ','' ); ?></div>
    125159
    126160        <div class="comment-body"><?php comment_text(); ?></div>
     
    148182if ( ! function_exists( 'twentyten_cat_list' ) ) :
    149183function twentyten_cat_list() {
    150     return twentyten_term_list('category', ', ', __('Posted in %s', 'twentyten'), __('Also posted in %s', 'twentyten') );
     184    return twentyten_term_list( 'category', ', ', __( 'Posted in %s', 'twentyten' ), __( 'Also posted in %s', 'twentyten' ) );
    151185}
    152186endif;
     
    154188if ( ! function_exists( 'twentyten_tag_list' ) ) :
    155189function twentyten_tag_list() {
    156     return twentyten_term_list('post_tag', ', ', __('Tagged %s', 'twentyten'), __('Also tagged %s', 'twentyten') );
     190    return twentyten_term_list( 'post_tag', ', ', __( 'Tagged %s', 'twentyten' ), __( 'Also tagged %s', 'twentyten' ) );
    157191}
    158192endif;
    159193
    160194if ( ! function_exists( 'twentyten_term_list' ) ) :
    161 function twentyten_term_list($taxonomy, $glue = ', ', $text = '', $also_text = '') {
     195function twentyten_term_list( $taxonomy, $glue = ', ', $text = '', $also_text = '' ) {
    162196    global $wp_query, $post;
    163197    $current_term = $wp_query->get_queried_object();
    164     $terms = wp_get_object_terms($post->ID, $taxonomy);
     198    $terms = wp_get_object_terms( $post->ID, $taxonomy );
    165199    // If we're viewing a Taxonomy page..
    166     if ( isset($current_term->taxonomy) && $taxonomy == $current_term->taxonomy ) {
     200    if ( isset( $current_term->taxonomy ) && $taxonomy == $current_term->taxonomy ) {
    167201        // Remove the term from display.
    168         foreach ( (array)$terms as $key => $term ) {
     202        foreach ( (array) $terms as $key => $term ) {
    169203            if ( $term->term_id == $current_term->term_id ) {
    170                 unset($terms[$key]);
     204                unset( $terms[$key] );
    171205                break;
    172206            }
     
    177211    $tlist = array();
    178212    $rel = 'category' == $taxonomy ? 'rel="category"' : 'rel="tag"';
    179     foreach ( (array)$terms as $term ) {
     213    foreach ( (array) $terms as $term ) {
    180214        $tlist[] = '<a href="' . get_term_link( $term, $taxonomy ) . '" title="' . esc_attr( sprintf( __( 'View all posts in %s', 'twentyten' ), $term->name ) ) . '" ' . $rel . '>' . $term->name . '</a>';
    181215    }
    182     if ( !empty($tlist) )
    183         return sprintf($text, join($glue, $tlist));
     216    if ( ! empty( $tlist ) )
     217        return sprintf( $text, join( $glue, $tlist ) );
    184218    return '';
    185219}
  • trunk/wp-content/themes/twentyten/header.php

    r13704 r13720  
    22<html <?php language_attributes(); ?>>
    33<head>
    4     <meta charset="<?php bloginfo('charset'); ?>" />
     4    <meta charset="<?php bloginfo( 'charset' ); ?>" />
    55    <title><?php
    66        if ( is_single() ) {
    7             single_post_title(); echo ' | '; bloginfo('name');
     7            single_post_title(); echo ' | '; bloginfo( 'name' );
    88        } elseif ( is_home() || is_front_page() ) {
    9             bloginfo('name'); echo ' | '; bloginfo('description'); twentyten_the_page_number();
     9            bloginfo( 'name' ); echo ' | '; bloginfo( 'description' ); twentyten_the_page_number();
    1010        } elseif ( is_page() ) {
    11             single_post_title(''); echo ' | '; bloginfo('name');
     11            single_post_title( '' ); echo ' | '; bloginfo( 'name' );
    1212        } elseif ( is_search() ) {
    13             printf(__('Search results for "%s"', 'twentyten'), esc_html($s)); twentyten_the_page_number(); echo ' | '; bloginfo('name');
     13            printf( __( 'Search results for "%s"', 'twentyten' ), esc_html( $s ) ); twentyten_the_page_number(); echo ' | '; bloginfo( 'name' );
    1414        } elseif ( is_404() ) {
    15             _e('Not Found', 'twentyten'); echo ' | '; bloginfo('name');
     15            _e( 'Not Found', 'twentyten' ); echo ' | '; bloginfo( 'name' );
    1616        } else {
    17             wp_title(''); echo ' | '; bloginfo('name'); twentyten_the_page_number();
     17            wp_title( '' ); echo ' | '; bloginfo( 'name' ); twentyten_the_page_number();
    1818        }
    1919    ?></title>
    2020    <link rel="profile" href="http://gmpg.org/xfn/11" />
    21     <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo('stylesheet_url'); ?>" />
    22     <link rel="stylesheet" type="text/css" media="print" href="<?php bloginfo('stylesheet_directory'); ?>/print.css" />
     21    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
     22    <link rel="stylesheet" type="text/css" media="print" href="<?php bloginfo( 'stylesheet_directory' ); ?>/print.css" />
    2323    <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
    2424    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
     
    3131        <div id="masthead">
    3232            <div id="branding">
    33                 <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>
     33                <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>
    3434                <div id="site-description"><?php bloginfo( 'description' ); ?></div>
    3535
    3636                <?php
    37                 if ( is_singular() && has_post_thumbnail( $post->ID ) ) {
     37                if ( is_singular() && has_post_thumbnail( $post->ID ) ) :
    3838                    echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
    39                 } else { ?>
     39                else : ?>
    4040                    <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
    41                 <?php } ?>
     41                <?php endif; ?>
    4242            </div><!-- #branding -->
    4343
  • trunk/wp-content/themes/twentyten/loop.php

    r13498 r13720  
    11<?php if ( $wp_query->max_num_pages > 1 ) : ?>
    22    <div id="nav-above" class="navigation">
    3         <div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">&larr;</span> Older posts', 'twentyten' )); ?></div>
    4         <div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentyten' )); ?></div>
     3        <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentyten' ) ); ?></div>
     4        <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?></div>
    55    </div><!-- #nav-above -->
    66<?php endif; ?>
     
    1919    <?php if ( in_category( 'Gallery' ) ) : ?>
    2020        <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    21             <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>
     21            <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>
    2222
    2323            <div class="entry-meta">
    2424                <?php
    25                     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'),
     25                    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' ),
    2626                        get_permalink(),
    2727                        esc_attr( get_the_time() ),
    2828                        get_the_date(),
    29                         get_author_posts_url( get_the_author_meta('ID') ),
     29                        get_author_posts_url( get_the_author_meta( 'ID' ) ),
    3030                        sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),
    3131                        get_the_author()
     
    3737                <div class="gallery-thumb">
    3838                    <a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php
    39                     $images = get_children( array('post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999) );
    40                     $total_images = count($images);
    41                     $image = array_shift($images);
     39                    $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) );
     40                    $total_images = count( $images );
     41                    $image = array_shift( $images );
    4242                    echo wp_get_attachment_image( $image->ID, 'thumbnail' );
    4343                    ?></a>
    4444                </div>
    45                 <p><em><?php printf( __('This gallery contains <a %1$s>%2$s photos</a>.', 'twentyten'),
    46                         'href="' . get_permalink() . '" title="' . sprintf( esc_attr__('Permalink to %s', 'twentyten'), the_title_attribute('echo=0') ) . '" rel="bookmark"',
     45                <p><em><?php printf( __( 'This gallery contains <a %1$s>%2$s photos</a>.', 'twentyten' ),
     46                        'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"',
    4747                        $total_images
    4848                    ); ?></em></p>
     
    5656                    $category_link = get_category_link( $category_id );
    5757                ?>
    58                 <a href="<?php echo $category_link; ?>" title="<?php esc_attr_e('View posts in the Gallery category', 'twentyten'); ?>"><?php _e('More Galleries', 'twentyten'); ?></a>
     58                <a href="<?php echo $category_link; ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a>
    5959                <span class="meta-sep"> | </span>
    6060                <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
     
    7878            <div class="entry-utility">
    7979                <?php
    80                     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'),
     80                    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' ),
    8181                        get_permalink(),
    8282                        esc_attr( get_the_time() ),
    8383                        get_the_date(),
    84                         get_author_posts_url( get_the_author_meta('ID') ),
     84                        get_author_posts_url( get_the_author_meta( 'ID' ) ),
    8585                        sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),
    8686                        get_the_author()
     
    9696    <?php else : ?>
    9797        <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    98             <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>
     98            <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>
    9999
    100100            <div class="entry-meta">
    101101                <?php
    102                     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'),
     102                    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' ),
    103103                        get_permalink(),
    104104                        esc_attr( get_the_time() ),
    105105                        get_the_date(),
    106                         get_author_posts_url( get_the_author_meta('ID') ),
     106                        get_author_posts_url( get_the_author_meta( 'ID' ) ),
    107107                        sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),
    108108                        get_the_author()
     
    126126                <span class="meta-sep"> | </span>
    127127                <?php $tags_text = twentyten_tag_list(); ?>
    128                 <?php if ( !empty($tags_text) ) : ?>
     128                <?php if ( ! empty( $tags_text ) ) : ?>
    129129                <span class="tag-links"><span class="entry-utility-prep entry-utility-prep-tag-links"><?php echo $tags_text; ?></span></span>
    130130                <span class="meta-sep"> | </span>
     
    142142<?php if (  $wp_query->max_num_pages > 1 ) : ?>
    143143                <div id="nav-below" class="navigation">
    144                     <div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">&larr;</span> Older posts', 'twentyten' )); ?></div>
    145                     <div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentyten' )); ?></div>
     144                    <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentyten' ) ); ?></div>
     145                    <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?></div>
    146146                </div><!-- #nav-below -->
    147147<?php endif; ?>
  • trunk/wp-content/themes/twentyten/onecolumn-page.php

    r13255 r13720  
    1616                    <div class="entry-content">
    1717                        <?php the_content(); ?>
    18                         <?php wp_link_pages( 'before=<div class="page-link">' . __( 'Pages:', 'twentyten' ) . '&after=</div>'); ?>
     18                        <?php wp_link_pages( 'before=<div class="page-link">' . __( 'Pages:', 'twentyten' ) . '&after=</div>' ); ?>
    1919                        <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
    2020                    </div><!-- .entry-content -->
  • trunk/wp-content/themes/twentyten/page.php

    r13128 r13720  
    1010                    <div class="entry-content">
    1111                        <?php the_content(); ?>
    12                         <?php wp_link_pages( 'before=<div class="page-link">' . __( 'Pages:', 'twentyten' ) . '&after=</div>'); ?>
     12                        <?php wp_link_pages( 'before=<div class="page-link">' . __( 'Pages:', 'twentyten' ) . '&after=</div>' ); ?>
    1313                        <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
    1414                    </div><!-- .entry-content -->
  • trunk/wp-content/themes/twentyten/search.php

    r13498 r13720  
    55
    66<?php if ( have_posts() ) : ?>
    7                 <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyten' ), '<span>' . get_search_query() . '</span>'); ?></h1>
     7                <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyten' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
    88    <?php get_generic_template( 'loop', 'search' ); ?>
    99<?php else : ?>
  • trunk/wp-content/themes/twentyten/sidebar-footer.php

    r13128 r13720  
    11<?php
    2     if ( is_active_sidebar('first-footer-widget-area') ||
    3         is_active_sidebar('second-footer-widget-area') ||
    4         is_active_sidebar('third-footer-widget-area') ||
    5         is_active_sidebar('fourth-footer-widget-area') ) :
     2    if (
     3        is_active_sidebar( 'first-footer-widget-area' )  ||
     4        is_active_sidebar( 'second-footer-widget-area' ) ||
     5        is_active_sidebar( 'third-footer-widget-area' )  ||
     6        is_active_sidebar( 'fourth-footer-widget-area' )
     7    ) :
    68?>
    79            <div id="footer-widget-area">
    8 <?php if ( is_active_sidebar('first-footer-widget-area') ) : ?>
     10<?php if ( is_active_sidebar( 'first-footer-widget-area' ) ) : ?>
    911                    <div id="first" class="widget-area">
    1012                        <ul class="xoxo">
     
    1416<?php endif; ?>
    1517
    16 <?php if ( is_active_sidebar('second-footer-widget-area') ) : ?>
     18<?php if ( is_active_sidebar( 'second-footer-widget-area' ) ) : ?>
    1719                <div id="second" class="widget-area">
    1820                    <ul class="xoxo">
     
    2224<?php endif; ?>
    2325
    24 <?php if ( is_active_sidebar('third-footer-widget-area') ) : ?>
     26<?php if ( is_active_sidebar( 'third-footer-widget-area' ) ) : ?>
    2527                <div id="third" class="widget-area">
    2628                    <ul class="xoxo">
     
    3032<?php endif; ?>
    3133
    32 <?php if ( is_active_sidebar('fourth-footer-widget-area') ) : ?>
     34<?php if ( is_active_sidebar( 'fourth-footer-widget-area' ) ) : ?>
    3335                <div id="fourth" class="widget-area">
    3436                    <ul class="xoxo">
  • trunk/wp-content/themes/twentyten/sidebar.php

    r13128 r13720  
    11        <div id="primary" class="widget-area">
    22            <ul class="xoxo">
    3 <?php if ( !dynamic_sidebar('primary-widget-area') ) : // begin primary widget area ?>
     3<?php if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : // begin primary widget area ?>
    44            <li id="search" class="widget-container widget_search">
    55                <?php get_search_form(); ?>
     
    2525        </div><!-- #primary .widget-area -->
    2626
    27 <?php if ( is_active_sidebar('secondary-widget-area') ) : // Nothing here by default and design ?>
     27<?php if ( is_active_sidebar( 'secondary-widget-area' ) ) : // Nothing here by default and design ?>
    2828        <div id="secondary" class="widget-area">
    2929            <ul class="xoxo">
  • trunk/wp-content/themes/twentyten/single.php

    r13498 r13720  
    1616                    <div class="entry-meta">
    1717                        <span class="meta-prep meta-prep-author"><?php _e( 'Posted by ', 'twentyten' ); ?></span>
    18                         <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>
     18                        <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>
    1919                        <span class="meta-sep"><?php _e( ' on ', 'twentyten' ); ?> </span>
    2020                        <a href="<?php the_permalink(); ?>" title="<?php the_time(); ?>" rel="bookmark"><span class="entry-date"><?php echo get_the_date(); ?></span></a>
     
    2727                    </div><!-- .entry-content -->
    2828
    29 <?php if ( get_the_author_meta('description') ) : // If a user has filled out their decscription show a bio on their entries  ?>
     29<?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their decscription show a bio on their entries  ?>
    3030                    <div id="entry-author-info">
    3131                        <div id="author-avatar">
    32                             <?php echo get_avatar( get_the_author_meta('user_email'), apply_filters('twentyten_author_bio_avatar_size', 60) ); ?>
     32                            <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?>
    3333                        </div><!-- #author-avatar   -->
    3434                        <div id="author-description">
    3535                            <h2><?php _e( 'About ', 'twentyten' ); ?><?php the_author(); ?></h2>
    36                             <?php the_author_meta('description'); ?>
     36                            <?php the_author_meta( 'description' ); ?>
    3737                            <div id="author-link">
    38                                 <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>
     38                                <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>
    3939                            </div><!-- #author-link -->
    4040                        </div><!-- #author-description  -->
     
    5252                        printf(
    5353                            $utility_text,
    54                             get_the_category_list(', '),
     54                            get_the_category_list( ', ' ),
    5555                            $tag_list,
    5656                            get_permalink(),
    57                             the_title_attribute('echo=0'),
     57                            the_title_attribute( 'echo=0' ),
    5858                            get_post_comments_feed_link()
    5959                        );
  • trunk/wp-content/themes/twentyten/tag.php

    r13498 r13720  
    77
    88                <h1 class="page-title"><?php
    9                     printf(__( 'Tag Archives: %s', 'twentyten' ), '<span>' . single_tag_title('', false) . '</span>');
     9                    printf( __( 'Tag Archives: %s', 'twentyten' ), '<span>' . single_tag_title( '', false ) . '</span>' );
    1010                ?></h1>
    1111
Note: See TracChangeset for help on using the changeset viewer.