Changeset 14708
- Timestamp:
- 05/17/2010 06:36:11 AM (14 years ago)
- Location:
- trunk/wp-content/themes/twentyten
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentyten/404.php
r14707 r14708 5 5 * @package WordPress 6 6 * @subpackage Twenty_Ten 7 * @since 3.0.07 * @since Twenty Ten 1.0 8 8 */ 9 9 ?> -
trunk/wp-content/themes/twentyten/archive.php
r14707 r14708 10 10 * @package WordPress 11 11 * @subpackage Twenty_Ten 12 * @since 3.0.012 * @since Twenty Ten 1.0 13 13 */ 14 14 ?> … … 19 19 <div id="content" role="main"> 20 20 21 <?php the_post(); ?> 21 <?php 22 /* Queue the first post, that way we know 23 * what date we're dealing with (if that is the case). 24 * 25 * We reset this later so we can run the loop 26 * properly with a call to rewind_posts(). 27 */ 28 the_post(); 29 ?> 22 30 23 31 <h1 class="page-title"> … … 32 40 <?php endif; ?> 33 41 </h1> 34 <?php rewind_posts(); ?> 42 35 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(); 49 36 50 /* Run the loop for the archives page to output the posts. 37 51 * If you want to overload this in a child theme then include a file -
trunk/wp-content/themes/twentyten/attachment.php
r14707 r14708 5 5 * @package WordPress 6 6 * @subpackage Twenty_Ten 7 * @since 3.0.07 * @since Twenty Ten 1.0 8 8 */ 9 9 ?> … … 14 14 <div id="content" role="main"> 15 15 16 <?php the_post(); ?>16 <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> 17 17 18 18 <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">← <?php echo get_the_title( $post->post_parent ); ?></a></p> … … 99 99 <?php comments_template(); ?> 100 100 101 <?php endwhile; ?> 102 101 103 </div><!-- #content --> 102 104 </div><!-- #container --> -
trunk/wp-content/themes/twentyten/author.php
r14707 r14708 5 5 * @package WordPress 6 6 * @subpackage Twenty_Ten 7 * @since 3.0.07 * @since Twenty Ten 1.0 8 8 */ 9 9 ?> … … 14 14 <div id="content" role="main"> 15 15 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 ?> 17 26 18 27 <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> 19 28 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. 31 if ( get_the_author_meta( 'description' ) ) : ?> 21 32 <div id="entry-author-info"> 22 33 <div id="author-avatar"> … … 30 41 <?php endif; ?> 31 42 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(); 33 49 34 <?php35 50 /* Run the loop for the author archive page to output the authors posts 36 51 * If you want to overload this in a child theme then include a file -
trunk/wp-content/themes/twentyten/category.php
r14707 r14708 5 5 * @package WordPress 6 6 * @subpackage Twenty_Ten 7 * @since 3.0.07 * @since Twenty Ten 1.0 8 8 */ 9 9 ?> … … 21 21 if ( ! empty( $category_description ) ) 22 22 echo '<div class="archive-meta">' . $categorydesc . '</div>'; 23 ?>24 23 25 <?php26 24 /* Run the loop for the category page to output the posts. 27 25 * If you want to overload this in a child theme then include a file -
trunk/wp-content/themes/twentyten/comments.php
r14707 r14708 10 10 * @package WordPress 11 11 * @subpackage Twenty_Ten 12 * @since 3.0.012 * @since Twenty Ten 1.0 13 13 */ 14 14 ?> … … 19 19 </div><!-- .comments --> 20 20 <?php 21 /* Stop the rest of comments.php from being processed, 22 * but don't kill the script entirely -- we still have 23 * to fully load the template. 24 */ 21 25 return; 22 26 endif; … … 28 32 29 33 <?php if ( have_comments() ) : ?> 30 <h3 id="comments-title"> 31 <?php 34 <h3 id="comments-title"><?php 32 35 printf( _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'twentyten' ), 33 36 number_format_i18n( get_comments_number() ), '<em>' . get_the_title() . '</em>' ); 34 ?> 35 </h3> 37 ?></h3> 36 38 37 <?php if ( get_comment_pages_count() > 1 ) : // are there comments to navigate through?>39 <?php if ( get_comment_pages_count() > 1 ) : // Are there comments to navigate through? ?> 38 40 <div class="navigation"> 39 41 <div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentyten' ) ); ?></div> … … 43 45 44 46 <ol class="commentlist"> 45 <?php wp_list_comments( array( 'callback' => 'twentyten_comment' ) ); ?> 47 <?php 48 /* Loop through and list the comments. Tell wp_list_comments() 49 * to use twentyten_comment() to format the comments. 50 * If you want to overload this in a child theme then you can 51 * define twentyten_comment() and that will be used instead. 52 * See twentyten_comment() in twentyten/functions.php for more. 53 */ 54 wp_list_comments( array( 'callback' => 'twentyten_comment' ) ); 55 ?> 46 56 </ol> 47 57 48 <?php if ( get_comment_pages_count() > 1 ) : // are there comments to navigate through?>58 <?php if ( get_comment_pages_count() > 1 ) : // Are there comments to navigate through? ?> 49 59 <div class="navigation"> 50 60 <div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentyten' ) ); ?></div> … … 53 63 <?php endif; // check for comment navigation ?> 54 64 55 <?php else : // this is displayed if there are no comments so far ?>65 <?php else : // or, if we don't have comments: 56 66 57 <?php if ( comments_open() ) : // If comments are open, but there are no comments ?> 67 /* If there are no comments and comments are closed, 68 * let's leave a little note, shall we? 69 */ 70 if ( ! comments_open() ) : 71 ?> 72 <p class="nocomments"><?php _e( 'Comments are closed.', 'twentyten' ); ?></p> 73 <?php endif; // end ! comments_opened() ?> 58 74 59 <?php else : // if comments are closed ?> 60 61 <p class="nocomments"><?php _e( 'Comments are closed.', 'twentyten' ); ?></p> 62 63 <?php endif; ?> 64 <?php endif; ?> 75 <?php endif; // end have_comments() ?> 65 76 66 77 <?php comment_form(); ?> -
trunk/wp-content/themes/twentyten/footer.php
r14707 r14708 8 8 * @package WordPress 9 9 * @subpackage Twenty_Ten 10 * @since 3.0.010 * @since Twenty Ten 1.0 11 11 */ 12 12 ?> … … 16 16 <div id="colophon"> 17 17 18 <?php get_sidebar( 'footer' ); ?> 18 <?php 19 /* A sidebar in the footer? Yep. You can can customize 20 * your footer with four columns of widgets. 21 */ 22 get_sidebar( 'footer' ); 23 ?> 19 24 20 25 <div id="site-info"> -
trunk/wp-content/themes/twentyten/header.php
r14692 r14708 7 7 * @package WordPress 8 8 * @subpackage Twenty_Ten 9 * @since 3.0.09 * @since Twenty Ten 1.0 10 10 */ 11 ?> 12 13 <!DOCTYPE html> 11 ?><!DOCTYPE html> 14 12 <html <?php language_attributes(); ?>> 15 13 <head> … … 47 45 <div id="masthead"> 48 46 <div id="branding" role="banner"> 49 <?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>47 <?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?> 50 48 <<?php echo $heading_tag; ?> id="site-title"> 51 49 <span> 52 50 <a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a> 53 51 </span> 54 </<?php echo $heading_tag; ?>> 52 </<?php echo $heading_tag; ?>> 55 53 <div id="site-description"><?php bloginfo( 'description' ); ?></div> 56 54 -
trunk/wp-content/themes/twentyten/index.php
r14707 r14708 11 11 * @package WordPress 12 12 * @subpackage Twenty_Ten 13 * @since 3.0.013 * @since Twenty Ten 1.0 14 14 */ 15 15 ?> -
trunk/wp-content/themes/twentyten/loop.php
r14707 r14708 10 10 * @package WordPress 11 11 * @subpackage Twenty_Ten 12 * @since 3.0.012 * @since Twenty Ten 1.0 13 13 */ 14 14 ?> … … 27 27 <h1 class="entry-title"><?php _e( 'Not Found', 'twentyten' ); ?></h1> 28 28 <div class="entry-content"> 29 <p><?php _e( 'Apologies, but no results were found for the requested Archive. Perhaps searching will help find a related post.', 'twentyten' ); ?></p>29 <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyten' ); ?></p> 30 30 <?php get_search_form(); ?> 31 31 </div><!-- .entry-content --> … … 33 33 <?php endif; ?> 34 34 35 <?php /* Start the Loop */ ?> 35 <?php 36 /* Start the Loop. 37 * 38 * In Twenty Ten we use the same loop in multiple contexts. 39 * It is broken into three main parts: when we're displaying 40 * posts that are in the gallery category, when we're displaying 41 * posts in the asides category, and finally all other posts. 42 * 43 * Additionally, we sometimes check for whether we are on an 44 * archive page, a search page, etc., allowing for small differences 45 * in the loop on each template without actually duplicating 46 * the rest of the loop that is shared. 47 * 48 * Without further ado, the loop: 49 */ ?> 36 50 <?php while ( have_posts() ) : the_post(); ?> 37 51 38 <?php /* How to Display posts in the Gallery Category */ ?> 52 <?php /* How to display posts in the Gallery category. */ ?> 53 39 54 <?php if ( in_category( _x('gallery', 'gallery category slug', 'twentyten') ) ) : ?> 40 55 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> … … 72 87 73 88 <?php /* How to display posts in the asides category */ ?> 89 74 90 <?php elseif ( in_category( _x('asides', 'asides category slug', 'twentyten') ) ) : ?> 75 91 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 76 <?php if ( is_archive() || is_search() ) : // Only display Excerpts for archives & search ?> 92 93 <?php if ( is_archive() || is_search() ) : // Display excerpts for archives and search. ?> 77 94 <div class="entry-summary"> 78 <?php the_excerpt( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' )); ?>95 <?php the_excerpt(); ?> 79 96 </div><!-- .entry-summary --> 80 <?php else : ?>97 <?php else : ?> 81 98 <div class="entry-content"> 82 99 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> 83 100 </div><!-- .entry-content --> 84 <?php endif; ?>101 <?php endif; ?> 85 102 86 103 <div class="entry-utility"> … … 90 107 <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?> 91 108 </div><!-- #entry-utility --> 92 </div><!-- #post- <?php the_ID(); ?>-->109 </div><!-- #post-(id) --> 93 110 94 <?php /* How to display all other posts */ ?> 111 <?php /* How to display all other posts. */ ?> 112 95 113 <?php else : ?> 96 114 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> … … 101 119 </div><!-- .entry-meta --> 102 120 103 <?php if ( is_archive() || is_search() ) : // Only display Excerpts for archives & search?>121 <?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?> 104 122 <div class="entry-summary"> 105 123 <?php the_excerpt( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> … … 115 133 <?php if ( count( get_the_category() ) ) : ?> 116 134 <span class="cat-links"> 117 <span class="entry-utility-prep entry-utility-prep-cat-links"><?php printf( __('Posted in %s', 'twentyten' ), '</span> ' .get_the_category_list( ', ' ) ); ?>135 <span class="entry-utility-prep entry-utility-prep-cat-links"><?php printf( __('Posted in %s', 'twentyten' ), '</span> ' . get_the_category_list( ', ' ) ); ?> 118 136 </span> 119 137 <span class="meta-sep">|</span> … … 135 153 <?php comments_template( '', true ); ?> 136 154 137 <?php endif; // if different categories queried ?> 138 <?php endwhile; ?> 155 <?php endif; // This was the if statement that broke the loop into three parts based on categories. ?> 156 157 <?php endwhile; // End the loop. Whew. ?> 139 158 140 159 <?php /* Display navigation to next/previous pages when applicable */ ?> -
trunk/wp-content/themes/twentyten/onecolumn-page.php
r14692 r14708 4 4 * 5 5 * A custom page template without sidebar. 6 * Selectable from a dropdown menu on the edit page screen. 6 * 7 * The "Template Name:" bit above allows this to be selectable 8 * from a dropdown menu on the edit page screen. 7 9 * 8 10 * @package WordPress 9 11 * @subpackage Twenty_Ten 10 * @since 3.0.012 * @since Twenty Ten 1.0 11 13 */ 12 14 ?> … … 14 16 <?php get_header(); ?> 15 17 16 <div id="container" class="one column">18 <div id="container" class="one-column"> 17 19 <div id="content" role="main"> 18 20 19 <?php the_post(); ?>21 <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> 20 22 21 23 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> … … 30 32 <?php comments_template( '', true ); ?> 31 33 34 <?php endwhile; ?> 35 32 36 </div><!-- #content --> 33 37 </div><!-- #container --> -
trunk/wp-content/themes/twentyten/page.php
r14707 r14708 10 10 * @package WordPress 11 11 * @subpackage Twenty_Ten 12 * @since 3.0.012 * @since Twenty Ten 1.0 13 13 */ 14 14 ?> … … 19 19 <div id="content" role="main"> 20 20 21 <?php the_post(); ?>21 <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> 22 22 23 23 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> … … 37 37 <?php comments_template( '', true ); ?> 38 38 39 <?php endwhile; ?> 40 39 41 </div><!-- #content --> 40 42 </div><!-- #container --> -
trunk/wp-content/themes/twentyten/search.php
r14707 r14708 5 5 * @package WordPress 6 6 * @subpackage Twenty_Ten 7 * @since 3.0.07 * @since Twenty Ten 1.0 8 8 */ 9 9 ?> -
trunk/wp-content/themes/twentyten/sidebar-footer.php
r14707 r14708 5 5 * @package WordPress 6 6 * @subpackage Twenty_Ten 7 * @since 3.0.07 * @since Twenty Ten 1.0 8 8 */ 9 9 ?> 10 10 11 11 <?php 12 if ( 13 is_active_sidebar( 'first-footer-widget-area' ) || 14 is_active_sidebar( 'second-footer-widget-area' ) || 15 is_active_sidebar( 'third-footer-widget-area' ) || 16 is_active_sidebar( 'fourth-footer-widget-area' ) 17 ) : 12 /* The footer widget area is triggered if any of the areas 13 * have widgets. So let's check that first. 14 * 15 * If none of the sidebars have widgets, then let's bail early. 16 */ 17 if ( ! is_active_sidebar( 'first-footer-widget-area' ) 18 && ! is_active_sidebar( 'second-footer-widget-area' ) 19 && ! is_active_sidebar( 'third-footer-widget-area' ) 20 && ! is_active_sidebar( 'fourth-footer-widget-area' ) 21 ) 22 return; 23 // If we get this far, we have widgets. Let do this. 18 24 ?> 25 19 26 <div id="footer-widget-area" role="complementary"> 27 20 28 <?php if ( is_active_sidebar( 'first-footer-widget-area' ) ) : ?> 21 22 23 24 25 29 <div id="first" class="widget-area"> 30 <ul class="xoxo"> 31 <?php dynamic_sidebar( 'first-footer-widget-area' ); ?> 32 </ul> 33 </div><!-- #first .widget-area --> 26 34 <?php endif; ?> 27 35 … … 51 59 52 60 </div><!-- #footer-widget-area --> 53 <?php endif; ?> -
trunk/wp-content/themes/twentyten/sidebar.php
r14707 r14708 5 5 * @package WordPress 6 6 * @subpackage Twenty_Ten 7 * @since 3.0.07 * @since Twenty Ten 1.0 8 8 */ 9 9 ?> … … 11 11 <div id="primary" class="widget-area" role="complementary"> 12 12 <ul class="xoxo"> 13 <?php if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : // begin primary widget area ?> 13 14 <?php 15 /* When we call the dynamic_sidebar() function, it'll spit out 16 * the widgets for that widget area. If it instead returns false, 17 * then the sidebar simply doesn't exist, so we'll hard-code in 18 * some default sidebar stuff just in case. 19 */ 20 if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?> 21 14 22 <li id="search" class="widget-container widget_search"> 15 23 <?php get_search_form(); ?> … … 31 39 </ul> 32 40 </li> 33 <?php endif; // end primary widget area ?> 41 42 <?php endif; // end primary widget area ?> 34 43 </ul> 35 44 </div><!-- #primary .widget-area --> 36 45 37 <?php if ( is_active_sidebar( 'secondary-widget-area' ) ) : // Nothing here by default and design ?> 46 <?php 47 // A second sidebar for widgets, just because. 48 if ( is_active_sidebar( 'secondary-widget-area' ) ) : ?> 49 38 50 <div id="secondary" class="widget-area" role="complementary"> 39 51 <ul class="xoxo"> … … 41 53 </ul> 42 54 </div><!-- #secondary .widget-area --> 55 43 56 <?php endif; ?> -
trunk/wp-content/themes/twentyten/single.php
r14707 r14708 5 5 * @package WordPress 6 6 * @subpackage Twenty_Ten 7 * @since 3.0.07 * @since Twenty Ten 1.0 8 8 */ 9 9 ?> … … 54 54 <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?> 55 55 </div><!-- .entry-utility --> 56 </div><!-- #post- <?php the_ID(); ?>-->56 </div><!-- #post-(id) --> 57 57 58 58 <div id="nav-below" class="navigation"> -
trunk/wp-content/themes/twentyten/style.css
r14689 r14708 88 88 */ 89 89 90 .one column #content {90 .one-column #content { 91 91 margin: 0 auto; 92 92 width: 640px; … … 1304 1304 } 1305 1305 #content, 1306 .one column #content {1306 .one-column #content { 1307 1307 width: 100%; 1308 1308 margin: 24pt 0 0; -
trunk/wp-content/themes/twentyten/tag.php
r14707 r14708 5 5 * @package WordPress 6 6 * @subpackage Twenty_Ten 7 * @since 3.0.07 * @since Twenty Ten 1.0 8 8 */ 9 9 ?> … … 14 14 <div id="content" role="main"> 15 15 16 <?php the_post(); ?> 17 18 <h1 class="page-title"> 19 <?php printf( __( 'Tag Archives: %s', 'twentyten' ), '<span>' . single_tag_title( '', false ) . '</span>' ); ?> 20 </h1> 21 22 <?php rewind_posts(); ?> 16 <h1 class="page-title"><?php 17 printf( __( 'Tag Archives: %s', 'twentyten' ), '<span>' . single_tag_title( '', false ) . '</span>' ); 18 ?></h1> 23 19 24 20 <?php
Note: See TracChangeset
for help on using the changeset viewer.