Make WordPress Core


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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; ?>
Note: See TracChangeset for help on using the changeset viewer.