Make WordPress Core


Ignore:
Timestamp:
05/17/2010 06:36:11 AM (16 years ago)
Author:
nacin
Message:

In Twenty Ten, documentation and code improvements. see #12695.

File:
1 edited

Legend:

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

    r14707 r14708  
    55 * @package WordPress
    66 * @subpackage Twenty_Ten
    7  * @since 3.0.0
     7 * @since Twenty Ten 1.0
    88 */
    99?>
     
    1414            <div id="content" role="main">
    1515
    16 <?php the_post(); ?>
     16<?php
     17    /* Queue the first post, that way we know who
     18     * the author is when we try to get their name,
     19     * URL, description, avatar, etc.
     20     *
     21     * We reset this later so we can run the loop
     22     * properly with a call to rewind_posts().
     23     */
     24    the_post();
     25?>
    1726
    1827                <h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentyten' ), "<span class='vcard'><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></span>" ); ?></h1>
    1928
    20 <?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries  ?>
     29<?php
     30// If a user has filled out their description, show a bio on their entries.
     31if ( get_the_author_meta( 'description' ) ) : ?>
    2132                    <div id="entry-author-info">
    2233                        <div id="author-avatar">
     
    3041<?php endif; ?>
    3142
    32 <?php rewind_posts(); ?>
     43<?php
     44    /* Since we called the_post() above, we need to
     45     * rewind the loop back to the beginning that way
     46     * we can run the loop properly, in full.
     47     */
     48    rewind_posts();
    3349
    34 <?php
    3550    /* Run the loop for the author archive page to output the authors posts
    3651     * If you want to overload this in a child theme then include a file
Note: See TracChangeset for help on using the changeset viewer.