Ticket #9015: twentyten-cleanup.diff
File twentyten-cleanup.diff, 57.5 KB (added by , 15 years ago) |
---|
-
wp-content/themes/twentyten/searchform.php
1 <form id="searchform" name="searchform" method="get" action="<?php echo home_url(); ?> ">1 <form id="searchform" name="searchform" method="get" action="<?php echo home_url(); ?>/"> 2 2 <div> 3 <label for="s"><?php _e( 'Search', 'twentyten'); ?></label>3 <label for="s"><?php _e( 'Search', 'twentyten' ); ?></label> 4 4 <input type="text" id="s" name="s" /> 5 <input type="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'twentyten'); ?>" />5 <input type="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'twentyten' ); ?>" /> 6 6 </div> 7 7 </form> 8 No newline at end of file -
wp-content/themes/twentyten/footer.php
3 3 <div id="footer"> 4 4 <div id="colophon"> 5 5 6 <?php get_sidebar( 'footer'); ?>6 <?php get_sidebar( 'footer' ); ?> 7 7 8 8 <div id="site-info"> 9 <a href="<?php bloginfo( 'url' ) ?>/" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' )?></a>9 <a href="<?php home_url(); ?>/" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a> 10 10 </div> 11 11 12 12 <div id="site-generator"> … … 21 21 <?php wp_footer(); ?> 22 22 23 23 </body> 24 </html> 24 </html> 25 No newline at end of file -
wp-content/themes/twentyten/author.php
5 5 6 6 <?php the_post(); ?> 7 7 8 <h1 class="page-title author"><?php printf( __( 'Author Archives: <span class="vcard">%s</span>', 'twentyten' ), "<a class='url fn n' href='$authordata->user_url' title='" . esc_attr($authordata->display_name) . "' rel='me'>" . esc_html($authordata->display_name) . "</a>" ) ?></h1>8 <h1 class="page-title author"><?php printf( __( 'Author Archives: <span class="vcard">%s</span>', 'twentyten' ), "<a class='url fn n' href='$authordata->user_url' title='" . esc_attr($authordata->display_name) . "' rel='me'>" . esc_html($authordata->display_name) . "</a>" ); ?></h1> 9 9 10 10 <?php if ( get_the_author_meta('description') ) : // If a user has filled out their decscription show a bio on their entries ?> 11 11 <div id="entry-author-info"> … … 13 13 <?php echo get_avatar( get_the_author_meta('user_email'), apply_filters('twentyten_author_bio_avatar_size', 60) ); ?> 14 14 </div><!-- #author-avatar --> 15 15 <div id="author-description"> 16 <h2><?php _e( 'About ', 'twentyten'); ?><?php the_author(); ?></h2>16 <h2><?php _e( 'About ', 'twentyten' ); ?><?php the_author(); ?></h2> 17 17 <?php the_author_meta('description'); ?> 18 18 </div><!-- #author-description --> 19 19 </div><!-- .entry-author-info --> … … 23 23 24 24 <?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?> 25 25 <div id="nav-above" class="navigation"> 26 <div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">←</span> Older posts', 'twentyten' )) ?></div>27 <div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' )) ?></div>26 <div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">←</span> Older posts', 'twentyten' )); ?></div> 27 <div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' )); ?></div> 28 28 </div><!-- #nav-above --> 29 29 <?php } ?> 30 30 … … 34 34 <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> 35 35 36 36 <div class="entry-meta"> 37 <span class="meta-prep meta-prep-author"><?php _e( 'Posted on ', 'twentyten'); ?></span>37 <span class="meta-prep meta-prep-author"><?php _e( 'Posted on ', 'twentyten' ); ?></span> 38 38 <a href="<?php 39 the_permalink(); ?>" title="<?php the_time('Y-m-d\TH:i:sO') ?>" rel="bookmark"><span class="entry-date"><?php the_time( get_option( 'date_format' ) ); ?></span></a>39 the_permalink(); ?>" title="<?php the_time('Y-m-d\TH:i:sO'); ?>" rel="bookmark"><span class="entry-date"><?php the_time( get_option( 'date_format' ) ); ?></span></a> 40 40 </div><!-- .entry-meta --> 41 41 42 42 <div class="entry-summary"> … … 44 44 </div><!-- .entry-summary --> 45 45 46 46 <div class="entry-utility"> 47 <span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in ', 'twentyten' ); ?></span><?php echo get_the_category_list( ', '); ?></span>47 <span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in ', 'twentyten' ); ?></span><?php echo get_the_category_list( ', ' ); ?></span> 48 48 <span class="meta-sep"> | </span> 49 <?php the_tags( '<span class="tag-links"><span class="entry-utility-prep entry-utility-prep-tag-links">' . __('Tagged ', 'twentyten' ) . '</span>', ", ", "</span>\n\t\t\t\t\t\t<span class=\"meta-sep\">|</span>\n" ) ?>50 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ) ?></span>51 <?php edit_post_link( __( 'Edit', 'twentyten' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t\n" ) ?>49 <?php the_tags( '<span class="tag-links"><span class="entry-utility-prep entry-utility-prep-tag-links">' . __('Tagged ', 'twentyten' ) . '</span>', ", ", "</span>\n\t\t\t\t\t\t<span class=\"meta-sep\">|</span>\n" ); ?> 50 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span> 51 <?php edit_post_link( __( 'Edit', 'twentyten' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t\n" ); ?> 52 52 </div><!-- #entry-utility --> 53 53 </div><!-- #post-<?php the_ID(); ?> --> 54 54 … … 56 56 57 57 <?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?> 58 58 <div id="nav-below" class="navigation"> 59 <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyten' ))?></div>60 <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' ))?></div>59 <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyten' ) ); ?></div> 60 <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div> 61 61 </div><!-- #nav-below --> 62 62 <?php } ?> 63 63 -
wp-content/themes/twentyten/sidebar-footer.php
1 1 <?php 2 if ( is_active_sidebar('first-footer-widget-area') || is_active_sidebar('second-footer-widget-area') || is_active_sidebar('third-footer-widget-area') ||is_active_sidebar('fourth-footer-widget-area') ) :2 if ( is_active_sidebar('first-footer-widget-area') OR is_active_sidebar('second-footer-widget-area') OR is_active_sidebar('third-footer-widget-area') OR is_active_sidebar('fourth-footer-widget-area') ) : 3 3 ?> 4 4 <div id="footer-widget-area"> 5 5 <?php if ( is_active_sidebar('first-footer-widget-area') ) : ?> 6 6 <div id="first" class="widget-area"> 7 7 <ul class="xoxo"> 8 <?php dynamic_sidebar( 'first-footer-widget-area'); ?>8 <?php dynamic_sidebar( 'first-footer-widget-area' ); ?> 9 9 </ul> 10 10 </div><!-- #first .widget-area --> 11 11 <?php endif; ?> … … 13 13 <?php if ( is_active_sidebar('second-footer-widget-area') ) : ?> 14 14 <div id="second" class="widget-area"> 15 15 <ul class="xoxo"> 16 <?php dynamic_sidebar( 'second-footer-widget-area'); ?>16 <?php dynamic_sidebar( 'second-footer-widget-area' ); ?> 17 17 </ul> 18 18 </div><!-- #second .widget-area --> 19 19 <?php endif; ?> … … 21 21 <?php if ( is_active_sidebar('third-footer-widget-area') ) : ?> 22 22 <div id="third" class="widget-area"> 23 23 <ul class="xoxo"> 24 <?php dynamic_sidebar( 'third-footer-widget-area'); ?>24 <?php dynamic_sidebar( 'third-footer-widget-area' ); ?> 25 25 </ul> 26 26 </div><!-- #third .widget-area --> 27 27 <?php endif; ?> … … 29 29 <?php if ( is_active_sidebar('fourth-footer-widget-area') ) : ?> 30 30 <div id="fourth" class="widget-area"> 31 31 <ul class="xoxo"> 32 <?php dynamic_sidebar( 'fourth-footer-widget-area'); ?>32 <?php dynamic_sidebar( 'fourth-footer-widget-area' ); ?> 33 33 </ul> 34 34 </div><!-- #fourth .widget-area --> 35 35 <?php endif; ?> -
wp-content/themes/twentyten/search.php
9 9 10 10 <?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?> 11 11 <div id="nav-above" class="navigation"> 12 <div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">←</span> Older posts', 'twentyten' )) ?></div>13 <div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' )) ?></div>12 <div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">←</span> Older posts', 'twentyten' )); ?></div> 13 <div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' )); ?></div> 14 14 </div><!-- #nav-above --> 15 15 <?php } ?> 16 16 17 <?php while ( have_posts() ) : the_post() ?>17 <?php while ( have_posts() ) : the_post(); ?> 18 18 19 19 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 20 20 <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 21 22 22 <?php if ( $post->post_type == 'post' ) { ?> 23 23 <div class="entry-meta"> 24 <span class="meta-prep meta-prep-author"><?php _e( 'Posted on ', 'twentyten'); ?></span>24 <span class="meta-prep meta-prep-author"><?php _e( 'Posted on ', 'twentyten' ); ?></span> 25 25 <a href="<?php 26 the_permalink(); ?>" title="<?php the_time( 'Y-m-d\TH:i:sO')?>" rel="bookmark"><span class="entry-date"><?php the_time( get_option( 'date_format' ) ); ?></span></a>27 <span class="meta-sep"> <?php _e( 'by ', 'twentyten'); ?> </span>26 the_permalink(); ?>" title="<?php the_time( 'Y-m-d\TH:i:sO' ); ?>" rel="bookmark"><span class="entry-date"><?php the_time( get_option( 'date_format' ) ); ?></span></a> 27 <span class="meta-sep"> <?php _e( 'by ', 'twentyten' ); ?> </span> 28 28 <span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( $authordata->ID, $authordata->user_nicename ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), $authordata->display_name ); ?>"><?php the_author(); ?></a></span> 29 29 </div><!-- .entry-meta --> 30 30 <?php } ?> 31 31 32 32 <div class="entry-summary"> 33 <?php the_excerpt( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) 34 <?php wp_link_pages( 'before=<div class="page-link">' . __( 'Pages:', 'twentyten' ) . '&after=</div>')?>33 <?php the_excerpt( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> 34 <?php wp_link_pages( 'before=<div class="page-link">' . __( 'Pages:', 'twentyten' ) . '&after=</div>' ); ?> 35 35 </div><!-- .entry-summary --> 36 36 37 37 <?php if ( $post->post_type == 'post' ) { ?> 38 38 <div class="entry-utility"> 39 <span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in ', 'twentyten' ); ?></span><?php echo get_the_category_list( ', '); ?></span>39 <span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in ', 'twentyten' ); ?></span><?php echo get_the_category_list( ', ' ); ?></span> 40 40 <span class="meta-sep"> | </span> 41 <?php the_tags( '<span class="tag-links"><span class="entry-utility-prep entry-utility-prep-tag-links">' . __('Tagged ', 'twentyten' ) . '</span>', ", ", "</span>\n\t\t\t\t\t\t<span class=\"meta-sep\">|</span>\n" ) ?>42 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ) ?></span>43 <?php edit_post_link( __( 'Edit', 'twentyten' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t\n" ) ?>41 <?php the_tags( '<span class="tag-links"><span class="entry-utility-prep entry-utility-prep-tag-links">' . __('Tagged ', 'twentyten' ) . '</span>', ", ", "</span>\n\t\t\t\t\t\t<span class=\"meta-sep\">|</span>\n" ); ?> 42 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span> 43 <?php edit_post_link( __( 'Edit', 'twentyten' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t\n" ); ?> 44 44 </div><!-- #entry-utility --> 45 45 <?php } ?> 46 46 </div><!-- #post-<?php the_ID(); ?> --> … … 49 49 50 50 <?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?> 51 51 <div id="nav-below" class="navigation"> 52 <div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">←</span> Older posts', 'twentyten' )) ?></div>53 <div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' )) ?></div>52 <div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">←</span> Older posts', 'twentyten' )); ?></div> 53 <div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' )); ?></div> 54 54 </div><!-- #nav-below --> 55 55 <?php } ?> 56 56 57 57 <?php else : ?> 58 58 59 59 <div id="post-0" class="post no-results not-found"> 60 <h2 class="entry-title"><?php _e( 'Nothing Found', 'twentyten' ) ?></h2>60 <h2 class="entry-title"><?php _e( 'Nothing Found', 'twentyten' ); ?></h2> 61 61 <div class="entry-content"> 62 62 <p><?php _e( 'Sorry, but nothing matched your search criteria. Please try again with some different keywords.', 'twentyten' ); ?></p> 63 63 <?php get_search_form(); ?> -
wp-content/themes/twentyten/404.php
4 4 <div id="content"> 5 5 6 6 <div id="post-0" class="post error404 not-found"> 7 <h1 class="entry-title"> Not Found</h1>7 <h1 class="entry-title"><?php _e( 'Not Found', 'twentyten' ); ?></h1> 8 8 <div class="entry-content"> 9 <p> Apologies, but the page you requested could not be found. Perhaps searching will help.</p>9 <p><?php _e( 'Apologies, but the page you requested could not be found. Perhaps searching will help.', 'twentyten' ); ?></p> 10 10 <?php get_search_form(); ?> 11 11 </div><!-- .entry-content --> 12 12 </div><!-- #post-0 --> -
wp-content/themes/twentyten/index.php
16 16 <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> 17 17 18 18 <div class="entry-meta"> 19 <span class="meta-prep meta-prep-author"><?php _e('Posted on ', 'twentyten'); ?></span> 20 <a href="<?php 21 the_permalink(); ?>" title="<?php the_time('Y-m-d\TH:i:sO') ?>" rel="bookmark"><span class="entry-date"><?php the_time( get_option( 'date_format' ) ); ?></span></a> 22 <span class="meta-sep"> <?php _e('by ', 'twentyten'); ?> </span> 19 <span class="meta-prep meta-prep-author"><?php _e( 'Posted on ', 'twentyten' ); ?></span> 20 <a href="<?php the_permalink(); ?>" title="<?php the_time( 'Y-m-d\TH:i:sO' ); ?>" rel="bookmark"><span class="entry-date"><?php the_time( get_option( 'date_format' ) ); ?></span></a> 21 <span class="meta-sep"> <?php _e( 'by ', 'twentyten' ); ?> </span> 23 22 <span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( $authordata->ID, $authordata->user_nicename ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), $authordata->display_name ); ?>"><?php the_author(); ?></a></span> 24 23 </div><!-- .entry-meta --> 25 24 26 25 <div class="entry-content"> 27 <div class="gallery-thumb"><a class="size-thumbnail" href="<?php permalink_link() ?>"><?php $hilite = $wpdb->get_var( "SELECT ID FROM $wpdb->posts WHERE post_parent = '$post->ID' AND post_type = 'attachment' LIMIT 1" ); echo wp_get_attachment_image( $hilite, 'thumbnail' );?></a></div>26 <div class="gallery-thumb"><a class="size-thumbnail" href="<?php permalink_link(); ?>"><?php $hilite = $wpdb->get_var( "SELECT ID FROM $wpdb->posts WHERE post_parent = '$post->ID' AND post_type = 'attachment' LIMIT 1" ); echo wp_get_attachment_image( $hilite, 'thumbnail' ); ?></a></div> 28 27 29 <p><em><?php printf( __('This gallery contains <a %1$s>%2$s photos</a>.', 'twentyten'), 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__('Permalink to %s', 'twentyten'), the_title_attribute('echo=0') ) . '" rel="bookmark"', $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_parent = '$post->ID' AND post_type = 'attachment'" ) ); ?></em></p>28 <p><em><?php printf( __('This gallery contains <a %1$s>%2$s photos</a>.', 'twentyten'), 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__('Permalink to %s', 'twentyten'), the_title_attribute('echo=0') ) . '" rel="bookmark"', $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_parent = '$post->ID' AND post_type = 'attachment'" ) ); ?></em></p> 30 29 31 <?php the_excerpt( ''); ?>30 <?php the_excerpt( '' ); ?> 32 31 </div><!-- .entry-content --> 33 32 34 33 <div class="entry-utility"> … … 36 35 $category_id = get_cat_ID( 'Gallery' ); 37 36 $category_link = get_category_link( $category_id ); 38 37 ?> 39 <a href="<?php echo $category_link; ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'twentyten'); ?>"><?php _e('More Galleries', 'twentyten'); ?></a>38 <a href="<?php echo $category_link; ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'twentyten' ); ?>"><?php _e( 'More Galleries', 'twentyten' ); ?></a> 40 39 41 40 <span class="meta-sep"> | </span> 42 41 … … 50 49 <?php } elseif ( in_category( 'asides' ) ) { ?> 51 50 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 52 51 <div class="entry-content"> 53 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>52 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> 54 53 </div><!-- .entry-content --> 55 54 56 55 <div class="entry-utility"> 57 <span class="meta-prep meta-prep-author"><?php _e( 'Posted on ', 'twentyten'); ?></span>56 <span class="meta-prep meta-prep-author"><?php _e( 'Posted on ', 'twentyten' ); ?></span> 58 57 <a href="<?php 59 the_permalink(); ?>" title="<?php the_time( 'Y-m-d\TH:i:sO')?>" rel="bookmark"><span class="entry-date"><?php the_time( get_option( 'date_format' ) ); ?></span></a>60 <span class="meta-sep"> <?php _e( 'by ', 'twentyten'); ?> </span>58 the_permalink(); ?>" title="<?php the_time( 'Y-m-d\TH:i:sO' ); ?>" rel="bookmark"><span class="entry-date"><?php the_time( get_option( 'date_format' ) ); ?></span></a> 59 <span class="meta-sep"> <?php _e( 'by ', 'twentyten' ); ?> </span> 61 60 <span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( $authordata->ID, $authordata->user_nicename ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), $authordata->display_name ); ?>"><?php the_author(); ?></a></span> 62 61 <span class="meta-sep"> | </span> 63 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ) ?></span>62 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span> 64 63 <?php edit_post_link( __( 'Edit', 'twentyten' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t\n" ) ?> 65 64 </div><!-- #entry-utility --> 66 65 </div><!-- #post-<?php the_ID(); ?> --> … … 71 70 <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> 72 71 73 72 <div class="entry-meta"> 74 <span class="meta-prep meta-prep-author"><?php _e( 'Posted on ', 'twentyten'); ?></span>73 <span class="meta-prep meta-prep-author"><?php _e( 'Posted on ', 'twentyten' ); ?></span> 75 74 <a href="<?php 76 the_permalink(); ?>" title="<?php the_time( 'Y-m-d\TH:i:sO')?>" rel="bookmark"><span class="entry-date"><?php the_time( get_option( 'date_format' ) ); ?></span></a>77 <span class="meta-sep"> <?php _e( 'by ', 'twentyten'); ?> </span>75 the_permalink(); ?>" title="<?php the_time( 'Y-m-d\TH:i:sO' ); ?>" rel="bookmark"><span class="entry-date"><?php the_time( get_option( 'date_format' ) ); ?></span></a> 76 <span class="meta-sep"> <?php _e( 'by ', 'twentyten' ); ?> </span> 78 77 <span class="author vcard"><a class="url fn n"2 href="<?php echo get_author_posts_url( $authordata->ID, $authordata->user_nicename ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), $authordata->display_name ); ?>"><?php the_author(); ?></a></span> 79 78 </div><!-- .entry-meta --> 80 79 81 80 <div class="entry-content"> 82 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' )); ?>83 <?php wp_link_pages('before=<div class="page-link">' . __( 'Pages:', 'twentyten' ) . '&after=</div>')?>81 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> 82 <?php wp_link_pages( 'before=<div class="page-link">' . __( 'Pages:', 'twentyten' ) . '&after=</div>' ); ?> 84 83 </div><!-- .entry-content --> 85 84 86 85 <div class="entry-utility"> 87 <span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in ', 'twentyten' ); ?></span><?php echo get_the_category_list( ', '); ?></span>86 <span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in ', 'twentyten' ); ?></span><?php echo get_the_category_list( ', ' ); ?></span> 88 87 <span class="meta-sep"> | </span> 89 <?php the_tags( '<span class="tag-links"><span class="entry-utility-prep entry-utility-prep-tag-links">' . __('Tagged ', 'twentyten' 88 <?php the_tags( '<span class="tag-links"><span class="entry-utility-prep entry-utility-prep-tag-links">' . __('Tagged ', 'twentyten') . '</span>', ", ", "</span>\n\t\t\t\t\t\t<span class=\"meta-sep\">|</span>\n" ) ?> 90 89 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ) ?></span> 91 90 <?php edit_post_link( __( 'Edit', 'twentyten' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t\n" ) ?> 92 91 </div><!-- #entry-utility --> 93 92 </div><!-- #post-<?php the_ID(); ?> --> 94 93 95 <?php comments_template( ); ?>94 <?php comments_template( '', true ); ?> 96 95 97 96 <?php } ?> 98 97 <?php endwhile; ?> … … 115 114 </div><!-- #container --> 116 115 117 116 <?php get_sidebar(); ?> 118 <?php get_footer(); ?> 117 <?php get_footer(); ?> 118 No newline at end of file -
wp-content/themes/twentyten/functions.php
1 1 <?php 2 3 2 // Set the content width based on the Theme CSS 4 $content_width = apply_filters( 'twentyten_content_width', 640 );3 $content_width = apply_filters( 'twentyten_content_width', 640 ); 5 4 5 // Enables automatic general feed link outputting 6 automatic_feed_links(); 7 6 8 // Your Changeable header business starts here 7 9 // No CSS, just IMG call 8 define( 'HEADER_TEXTCOLOR', '' );9 define( 'HEADER_IMAGE', '%s/images/header-1.jpg' ); // %s is theme dir uri10 define( 'HEADER_TEXTCOLOR', '' ); 11 define( 'HEADER_IMAGE', '%s/images/header-1.jpg' ); // %s is theme dir uri 10 12 define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyten_header_image_width', 940 ) ); 11 13 define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyten_header_image_height', 198 ) ); 12 14 define( 'NO_HEADER_TEXT', true ); … … 25 27 <?php 26 28 } 27 29 28 add_custom_image_header( '', 'twentyten_admin_header_style');30 add_custom_image_header( '', 'twentyten_admin_header_style' ); 29 31 // and thus ends the changeable header business 30 32 31 33 add_custom_background(); … … 44 46 $locale = get_locale(); 45 47 $locale_file = TEMPLATEPATH . "/languages/$locale.php"; 46 48 if ( is_readable($locale_file) ) 47 require_once($locale_file); 49 require_once( $locale_file ); 50 51 // Get the page title 52 function twentyten_page_title( $sep = '|' ) { 53 $title = null; 54 55 if ( is_single() ) { 56 $title = sprintf( '%1$s %2$s %3$s', single_post_title( '', false ), $sep, get_bloginfo( 'name' ) ); 57 58 } elseif ( is_home() OR is_front_page() ) { 59 $title = sprintf( '%1$s %2$s %3$s %4$s', get_bloginfo( 'name' ), $sep, get_bloginfo( 'description' ), twentyten_get_page_number($sep) ); 60 61 } elseif ( is_page() ) { 62 $title = sprintf( '%1$s %2$s %3$s', single_post_title( '', false ), $sep, get_bloginfo( 'name' ) ); 63 64 } elseif ( is_search() ) { 65 $title = sprintf( __( 'Search results for %1$s %2$s %3$s %4$s', 'twentyten' ), esc_html($s), twentyten_get_page_number($sep), " $sep ", get_bloginfo('name') ); 66 67 } elseif ( is_404() ) { 68 $title = sprintf( __( 'Not Found %1$s %1$s', 'twentyten' ), $sep, get_bloginfo( 'name' ) ); 69 70 } else { 71 $title = sprintf( '%1$s %2$s %3$s', get_bloginfo( 'name' ), wp_title($sep, false), twentyten_get_page_number($sep) ); 72 } 73 74 echo apply_filters( 'twentyten_page_title', $title ); 75 } 76 // end twentyten_page_title 48 77 49 50 51 78 // Get the page number 52 function get_page_number() {79 function twentyten_get_page_number( $sep = '|' ) { 53 80 if ( get_query_var('paged') ) 54 print ' | ' . __( 'Page ' , 'twentyten') . get_query_var('paged');55 } // end get_page_number81 return sprintf( __( ' %1$s Page %2$s' , 'twentyten' ), $sep, get_query_var( 'paged' ) ); 82 } // end twentyten_get_page_number 56 83 57 84 85 // Enqueue the CSS stylesheets 86 function twentyten_enqueue_styles() { 87 if ( !is_admin() ) { 88 wp_enqueue_style( 'twentyten_style', get_bloginfo( 'stylesheet_url' ) ); 89 wp_enqueue_style( 'twentyten_print', get_stylesheet_directory_uri() . '/print.css', null, false, 'print' ); 90 } 91 } 92 add_action( 'init', 'twentyten_enqueue_styles' ); 58 93 94 95 // Enqueues the javascript for comment replys 96 function twentyten_enqueue_scripts() { 97 if ( is_singular() and get_site_option('thread_comments') ) 98 wp_print_scripts( 'comment-reply' ); 99 } 100 add_action( 'wp_head', 'twentyten_enqueue_scripts' ); 101 102 103 // Displays the post thumbnail image on singular pages. All other pages get the header image. 104 function twentyten_header_image() { 105 global $post; 106 107 if ( is_singular() && has_post_thumbnail( $post->ID ) ) { 108 echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' ); 109 } else { ?> 110 <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" /> 111 <?php 112 } 113 } 114 115 59 116 // Control excerpt length 60 function new_excerpt_length($length) {117 function twentyten_new_excerpt_length() { 61 118 return 40; 62 119 } 63 add_filter( 'excerpt_length', 'new_excerpt_length');120 add_filter( 'excerpt_length', 'twentyten_new_excerpt_length' ); 64 121 65 122 66 67 123 // Make a nice read more link on excerpts 68 function new_excerpt_more($more) {124 function twentyten_new_excerpt_more( $more ) { 69 125 return ' … <a href="'. get_permalink() . '">' . 'Continue reading <span class="meta-nav">→</span>' . '</a>'; 70 126 } 71 add_filter( 'excerpt_more', 'new_excerpt_more');127 add_filter( 'excerpt_more', 'twentyten_new_excerpt_more' ); 72 128 73 129 74 75 130 // Template for comments and pingbacks 76 function twentyten_ comment($comment, $args, $depth) {77 $GLOBALS 78 <?php if ( '' == $comment->comment_type) { ?>79 <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">131 function twentyten_list_comments( $comment, $args, $depth ) { 132 $GLOBALS['comment'] = $comment; ?> 133 <?php if ( '' == $comment->comment_type ) { ?> 134 <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>"> 80 135 <div id="comment-<?php comment_ID(); ?>"> 81 136 <div class="comment-author vcard"> 82 <?php echo get_avatar( $comment,$size='40'); ?>137 <?php echo get_avatar( $comment, $size = 40 ); ?> 83 138 84 <?php printf( __('<cite class="fn">%s</cite> <span class="says">says:</span>'), get_comment_author_link())?>139 <?php printf( __( '<cite class="fn">%s</cite> <span class="says">says:</span>', 'twentyten' ), get_comment_author_link() ); ?> 85 140 </div> 86 141 <?php if ($comment->comment_approved == '0') : ?> 87 <em><?php _e( 'Your comment is awaiting moderation.')?></em>142 <em><?php _e( 'Your comment is awaiting moderation.', 'twentyten' ); ?></em> 88 143 <br /> 89 144 <?php endif; ?> 90 145 91 <div class="comment-meta commentmetadata"><a href="<?php echo htmlspecialchars( 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)'),' ','')?></div>146 <div class="comment-meta commentmetadata"><a href="<?php echo htmlspecialchars( get_comment_link($comment->comment_ID) ); ?>"><?php printf( __('%1$s at %2$s', 'twentyten'), get_comment_date(), get_comment_time() ); ?></a><?php edit_comment_link( __('(Edit)', 'twentyten'),' ','' ); ?></div> 92 147 93 <div class="comment-body"><?php comment_text() ?></div>148 <div class="comment-body"><?php comment_text(); ?></div> 94 149 95 150 <div class="reply"> 96 <?php comment_reply_link( array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth'])))?>151 <?php comment_reply_link( array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth'])) ); ?> 97 152 </div> 98 153 </div> 99 154 100 155 <?php } else { ?> 101 156 <li class="post pingback"> 102 <p><?php _e( 'Pingback:') ?> <?php comment_author_link ()?><?php edit_comment_link ( 'edit', ' ', '' ); ?></p>157 <p><?php _e( 'Pingback: ', 'twentyten' ) ?><?php comment_author_link(); ?><?php edit_comment_link( __( 'edit', 'twentyten' ), ' ', '' ); ?></p> 103 158 <?php } 104 159 } 105 160 106 161 107 108 162 // Make the Visual Editor styles match the theme's styles 109 add_filter('mce_css', 'my_editor_style'); 110 function my_editor_style($url) { 163 add_filter( 'mce_css', 'twentyten_editor_style' ); 164 function twentyten_editor_style( $url ) { 165 if ( !empty($url) ) 166 $url .= ','; 111 167 112 if ( !empty($url) )113 $url .= ',';114 115 168 // Change the path here if using sub-directory 116 169 $url .= trailingslashit( get_stylesheet_directory_uri() ) . 'editor-style.css'; 117 170 … … 119 172 } 120 173 121 174 122 123 175 // Remove inline styles on gallery shortcode 124 125 function remove_gallery_css() { 126 return "<div class='gallery'>"; 176 function twentyten_remove_gallery_css() { 177 return '<div class="gallery">'; 127 178 } 128 add_filter( 'gallery_style', 'remove_gallery_css');179 add_filter( 'gallery_style', 'twentyten_remove_gallery_css' ); 129 180 130 181 131 132 182 // For category lists on category archives: Returns other categories except the current one (redundant) 133 function cats_meow($glue) {183 function twentyten_cats_meow( $glue ) { 134 184 $current_cat = single_cat_title( '', false ); 135 185 $separator = "\n"; 136 186 $cats = explode( $separator, get_the_category_list($separator) ); … … 143 193 if ( empty($cats) ) 144 194 return false; 145 195 146 return trim( join( $glue, $cats ));147 } // end cats_meow196 return trim( join( $glue, $cats ) ); 197 } // end twentyten_cats_meow 148 198 149 199 150 200 151 201 // For tag lists on tag archives: Returns other tags except the current one (redundant) 152 function t ag_ur_it($glue) {202 function twentyten_tag_ur_it( $glue ) { 153 203 $current_tag = single_tag_title( '', '', false ); 154 204 $separator = "\n"; 155 205 $tags = explode( $separator, get_the_tag_list( "", "$separator", "" ) ); … … 162 212 if ( empty($tags) ) 163 213 return false; 164 214 165 return trim( join( $glue, $tags ));166 } // end t ag_ur_it215 return trim( join( $glue, $tags ) ); 216 } // end twentyten_tag_ur_it 167 217 168 218 169 219 // Register widgetized areas 170 function t heme_widgets_init() {220 function twentyten_widgets_init() { 171 221 // Area 1 172 register_sidebar( array 222 register_sidebar( array( 173 223 'name' => 'Primary Widget Area', 174 224 'id' => 'primary-widget-area', 175 225 'description' => __('The primary widget area' , 'twentyten'), … … 180 230 ) ); 181 231 182 232 // Area 2 183 register_sidebar( array 233 register_sidebar( array( 184 234 'name' => 'Secondary Widget Area', 185 235 'id' => 'secondary-widget-area', 186 236 'description' => __('The secondary widget area' , 'twentyten'), … … 191 241 ) ); 192 242 193 243 // Area 3 194 register_sidebar( array 244 register_sidebar( array( 195 245 'name' => 'First Footer Widget Area', 196 246 'id' => 'first-footer-widget-area', 197 247 'description' => __('The first footer widget area' , 'twentyten'), … … 202 252 ) ); 203 253 204 254 // Area 4 205 register_sidebar( array 255 register_sidebar( array( 206 256 'name' => 'Second Footer Widget Area', 207 257 'id' => 'second-footer-widget-area', 208 258 'description' => __('The second footer widget area' , 'twentyten'), … … 213 263 ) ); 214 264 215 265 // Area 5 216 register_sidebar( array 266 register_sidebar( array( 217 267 'name' => 'Third Footer Widget Area', 218 268 'id' => 'third-footer-widget-area', 219 269 'description' => __('The third footer widget area' , 'twentyten'), … … 224 274 ) ); 225 275 226 276 // Area 6 227 register_sidebar( array 277 register_sidebar( array( 228 278 'name' => 'Fourth Footer Widget Area', 229 279 'id' => 'fourth-footer-widget-area', 230 280 'description' => __('The fourth footer widget area' , 'twentyten'), … … 234 284 'after_title' => '</h3>', 235 285 ) ); 236 286 237 } // end t heme_widgets_init287 } // end twentyten_widgets_init 238 288 239 240 241 289 // Add all the groovy widget areas 242 add_action( 'init', 'theme_widgets_init' ); 290 add_action( 'init', 'twentyten_widgets_init' ); 291 No newline at end of file -
wp-content/themes/twentyten/sidebar.php
6 6 </li> 7 7 8 8 <li id="archives" class="widget-container"> 9 <h3 class="widget-title"><?php _e( 'Archives', 'twentyten')?></h3>9 <h3 class="widget-title"><?php _e( 'Archives', 'twentyten' ); ?></h3> 10 10 <ul> 11 <?php wp_get_archives( 'type=monthly')?>11 <?php wp_get_archives( 'type=monthly' ); ?> 12 12 </ul> 13 13 </li> 14 14 15 15 <li id="meta" class="widget-container"> 16 <h3 class="widget-title"><?php _e( 'Meta', 'twentyten')?></h3>16 <h3 class="widget-title"><?php _e( 'Meta', 'twentyten' ); ?></h3> 17 17 <ul> 18 <?php wp_register() ?>18 <?php wp_register(); ?> 19 19 20 <li><?php wp_loginout() ?></li>21 <?php wp_meta() ?>20 <li><?php wp_loginout(); ?></li> 21 <?php wp_meta(); ?> 22 22 23 23 </ul> 24 24 </li> … … 29 29 <?php if ( is_active_sidebar('secondary-widget-area') ) : // Nothing here by default and design ?> 30 30 <div id="secondary" class="widget-area"> 31 31 <ul class="xoxo"> 32 <?php dynamic_sidebar( 'secondary-widget-area'); ?>32 <?php dynamic_sidebar( 'secondary-widget-area' ); ?> 33 33 </ul> 34 34 </div><!-- #secondary .widget-area --> 35 35 <?php endif; ?> 36 No newline at end of file -
wp-content/themes/twentyten/tag.php
35 35 <div class="entry-utility"> 36 36 <span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in ', 'twentyten' ); ?></span><?php echo get_the_category_list(', '); ?></span> 37 37 <span class="meta-sep"> | </span> 38 <?php if ( $tag_ur_it = t ag_ur_it(', ') ) : // Returns tags other than the one queried ?>38 <?php if ( $tag_ur_it = twentyten_tag_ur_it(', ') ) : // Returns tags other than the one queried ?> 39 39 <span class="tag-links"><?php printf( __( 'Also tagged %s', 'twentyten' ), $tag_ur_it ) ?></span> 40 40 <?php endif; ?> 41 41 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ) ?></span> -
wp-content/themes/twentyten/page.php
8 8 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 9 9 <h1 class="entry-title"><?php the_title(); ?></h1> 10 10 <div class="entry-content"> 11 <?php the_content(); ?>12 <?php wp_link_pages('before=<div class="page-link">' . __( 'Pages:', 'twentyten' ) . '&after=</div>')?>13 <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' )?>11 <?php the_content(); ?> 12 <?php wp_link_pages( 'before=<div class="page-link">' . __( 'Pages:', 'twentyten' ) . '&after=</div>' ); ?> 13 <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?> 14 14 </div><!-- .entry-content --> 15 15 </div><!-- #post-<?php the_ID(); ?> --> 16 16 17 <?php comments_template( ); ?>17 <?php comments_template( '', true ); ?> 18 18 19 19 </div><!-- #content --> 20 20 </div><!-- #container --> -
wp-content/themes/twentyten/category.php
36 36 </div><!-- .entry-summary --> 37 37 38 38 <div class="entry-utility"> 39 <?php if ( $cats_meow = cats_meow(', ') ) : // Returns categories other than the one queried ?>39 <?php if ( $cats_meow = twentyten_cats_meow(', ') ) : // Returns categories other than the one queried ?> 40 40 <span class="cat-links"><?php printf( __( 'Also posted in %s', 'twentyten' ), $cats_meow ) ?></span> 41 41 <span class="meta-sep"> | </span> 42 42 <?php endif ?> -
wp-content/themes/twentyten/archive.php
6 6 <?php the_post(); ?> 7 7 8 8 <?php if ( is_day() ) : ?> 9 <h1 class="page-title"><?php printf( __( 'Daily Archives: <span>%s</span>', 'twentyten' ), get_the_time(get_option('date_format')) ) ?></h1>9 <h1 class="page-title"><?php printf( __( 'Daily Archives: <span>%s</span>', 'twentyten' ), get_the_time(get_option('date_format')) ); ?></h1> 10 10 <?php elseif ( is_month() ) : ?> 11 <h1 class="page-title"><?php printf( __( 'Monthly Archives: <span>%s</span>', 'twentyten' ), get_the_time('F Y') ) ?></h1>11 <h1 class="page-title"><?php printf( __( 'Monthly Archives: <span>%s</span>', 'twentyten' ), get_the_time('F Y') ); ?></h1> 12 12 <?php elseif ( is_year() ) : ?> 13 <h1 class="page-title"><?php printf( __( 'Yearly Archives: <span>%s</span>', 'twentyten' ), get_the_time('Y') ) ?></h1>13 <h1 class="page-title"><?php printf( __( 'Yearly Archives: <span>%s</span>', 'twentyten' ), get_the_time('Y') ); ?></h1> 14 14 <?php elseif ( isset($_GET['paged']) && !empty($_GET['paged']) ) : ?> 15 <h1 class="page-title"><?php _e( 'Blog Archives', 'twentyten' ) ?></h1>15 <h1 class="page-title"><?php _e( 'Blog Archives', 'twentyten' ); ?></h1> 16 16 <?php endif; ?> 17 17 18 18 <?php rewind_posts(); ?> 19 19 20 20 <?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?> 21 21 <div id="nav-above" class="navigation"> 22 <div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">←</span> Older posts', 'twentyten' )) ?></div>23 <div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' )) ?></div>22 <div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">←</span> Older posts', 'twentyten' )); ?></div> 23 <div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' )); ?></div> 24 24 </div><!-- #nav-above --> 25 25 <?php } ?> 26 26 … … 44 44 <div class="entry-utility"> 45 45 <span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in ', 'twentyten' ); ?></span><?php echo get_the_category_list(', '); ?></span> 46 46 <span class="meta-sep"> | </span> 47 <?php the_tags( '<span class="tag-links"><span class="entry-utility-prep entry-utility-prep-tag-links">' . __('Tagged ', 'twentyten' ) . '</span>', ", ", "</span>\n\t\t\t\t\t\t<span class=\"meta-sep\">|</span>\n" ) ?>48 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ) ?></span>49 <?php edit_post_link( __( 'Edit', 'twentyten' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t\n" ) ?>47 <?php the_tags( '<span class="tag-links"><span class="entry-utility-prep entry-utility-prep-tag-links">' . __('Tagged ', 'twentyten' ) . '</span>', ", ", "</span>\n\t\t\t\t\t\t<span class=\"meta-sep\">|</span>\n" ); ?> 48 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span> 49 <?php edit_post_link( __( 'Edit', 'twentyten' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t\n" ); ?> 50 50 </div><!-- #entry-utility --> 51 51 </div><!-- #post-<?php the_ID(); ?> --> 52 52 … … 54 54 55 55 <?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?> 56 56 <div id="nav-below" class="navigation"> 57 <div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">←</span> Older posts', 'twentyten' )) ?></div>58 <div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' )) ?></div>57 <div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">←</span> Older posts', 'twentyten' )); ?></div> 58 <div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' )); ?></div> 59 59 </div><!-- #nav-below --> 60 60 <?php } ?> 61 61 -
wp-content/themes/twentyten/single.php
59 59 <div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">→</span>' ) ?></div> 60 60 </div><!-- #nav-below --> 61 61 62 <?php comments_template( '', true); ?>62 <?php comments_template( '', true ); ?> 63 63 64 64 </div><!-- #content --> 65 65 </div><!-- #container --> -
wp-content/themes/twentyten/comments.php
1 1 <div id="comments"> 2 2 <?php 3 3 // Do not delete these lines 4 $req = get_option( 'require_name_email'); // Checks if fields are required.4 $req = get_option( 'require_name_email' ); // Checks if fields are required. 5 5 if ( 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']) ) 6 6 die ( 'Please do not load this page directly. Thanks!' ); 7 7 if ( post_password_required() ) : 8 8 ?> 9 <div class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyten')?></div>9 <div class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyten' ); ?></div> 10 10 </div><!-- .comments --> 11 11 <?php 12 12 return; … … 22 22 23 23 <?php $total_pages = get_comment_pages_count(); if ( $total_pages > 1 ) : // are there comments to navigate through ?> 24 24 <div class="navigation"> 25 <div class="nav-previous"><?php previous_comments_link( __('← Older Comments', 'twentyten') ) ?></div>26 <div class="nav-next"><?php next_comments_link( __('Newer Comments →', 'twentyten') ) ?></div>25 <div class="nav-previous"><?php previous_comments_link( __('← Older Comments', 'twentyten') ); ?></div> 26 <div class="nav-next"><?php next_comments_link( __('Newer Comments →', 'twentyten') ); ?></div> 27 27 </div> 28 28 <?php endif; // check for comment navigation ?> 29 29 30 30 <ol class="commentlist"> 31 <?php wp_list_comments( array('callback' => 'twentyten_ comment') ); ?>31 <?php wp_list_comments( array('callback' => 'twentyten_list_comments') ); ?> 32 32 </ol> 33 33 34 34 <?php $total_pages = get_comment_pages_count(); if ( $total_pages > 1 ) : // are there comments to navigate through ?> 35 35 <div class="navigation"> 36 <div class="nav-previous"><?php previous_comments_link( __('← Older Comments', 'twentyten') ) ?></div>37 <div class="nav-next"><?php next_comments_link( __('Newer Comments →', 'twentyten') ) ?></div>36 <div class="nav-previous"><?php previous_comments_link( __('← Older Comments', 'twentyten') ); ?></div> 37 <div class="nav-next"><?php next_comments_link( __('Newer Comments →', 'twentyten') ); ?></div> 38 38 </div> 39 39 <?php endif; // check for comment navigation ?> 40 40 … … 44 44 45 45 <?php else : // if comments are closed ?> 46 46 47 <p class="nocomments"><?php _e( 'Comments are closed.', 'twentyten'); ?></p>47 <p class="nocomments"><?php _e( 'Comments are closed.', 'twentyten' ); ?></p> 48 48 49 49 <?php endif; ?> 50 50 <?php endif; ?> -
wp-content/themes/twentyten/header.php
1 1 <!DOCTYPE html> 2 2 <html <?php language_attributes(); ?>> 3 3 <head> 4 <title><?php 5 if ( is_single() ) { single_post_title(); print ' | '; bloginfo('name'); } 6 elseif ( is_home() || is_front_page() ) { bloginfo('name'); print ' | '; bloginfo('description'); get_page_number(); } 7 elseif ( is_page() ) { single_post_title(''); print ' | '; bloginfo('name'); } 8 elseif ( is_search() ) { print 'Search results for ' . wp_specialchars($s); get_page_number(); print ' | '; bloginfo('name'); } 9 elseif ( is_404() ) { print 'Not Found | '; bloginfo('name'); } 10 else { bloginfo('name'); wp_title('|'); get_page_number(); } 11 ?></title> 4 <title><?php twentyten_page_title(); ?></title> 12 5 13 <meta http-equiv="content-type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> 14 6 <meta http-equiv="content-type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php bloginfo( 'charset' ); ?>" /> 15 7 <link rel="profile" href="http://gmpg.org/xfn/11"> 16 <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo('stylesheet_url'); ?>" /> 17 <link rel="stylesheet" type="text/css" media="print" href="<?php bloginfo('stylesheet_directory'); ?>/print.css" /> 18 19 <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?> 20 8 21 9 <?php wp_head(); ?> 22 10 23 <link rel="alternate" type="application/rss+xml" href="<?php bloginfo( 'rss2_url'); ?>" title="<?php printf( esc_attr__( '%s latest posts', 'twentyten' ), wp_specialchars( get_bloginfo('name'), 1 ) ); ?>" />24 <link rel="alternate" type="application/rss+xml" href="<?php bloginfo( 'comments_rss2_url') ?>" title="<?php printf( esc_attr__( '%s latest comments', 'twentyten' ), wp_specialchars( get_bloginfo('name'), 1 ) ); ?>" />25 <link rel="pingback" href="<?php bloginfo( 'pingback_url'); ?>" />11 <link rel="alternate" type="application/rss+xml" href="<?php bloginfo( 'rss2_url' ); ?>" title="<?php printf( esc_attr__( '%s latest posts', 'twentyten' ), esc_attr( get_bloginfo('name'), 1 ) ); ?>" /> 12 <link rel="alternate" type="application/rss+xml" href="<?php bloginfo( 'comments_rss2_url' ); ?>" title="<?php printf( esc_attr__( '%s latest comments', 'twentyten' ), esc_attr( get_bloginfo('name'), 1 ) ); ?>" /> 13 <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" /> 26 14 </head> 27 15 28 16 <body <?php body_class(); ?>> … … 32 20 <div id="masthead"> 33 21 34 22 <div id="branding"> 35 <div id="site-title"><span><a href="<?php bloginfo( 'url' ) ?>/" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ) ?></a></span></div> 36 <div id="site-description"><?php bloginfo( 'description' ) ?></div> 37 38 <?php 39 global $post; 40 if ( is_singular() && has_post_thumbnail( $post->ID ) ) { 41 echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' ); 42 } else { ?> 43 <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" /> 44 <?php } ?> 23 <div id="site-title"><span><a href="<?php home_url(); ?>/" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></div> 24 <div id="site-description"><?php bloginfo( 'description' ); ?></div> 25 <?php twentyten_header_image(); ?> 45 26 </div><!-- #branding --> 46 27 47 28 <div id="access"> 48 <div class="skip-link screen-reader-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyten' ) ?>"><?php _e( 'Skip to content', 'twentyten' )?></a></div>29 <div class="skip-link screen-reader-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyten' ); ?>"><?php _e( 'Skip to content', 'twentyten' ); ?></a></div> 49 30 <?php wp_page_menu( 'sort_column=menu_order' ); ?> 50 31 </div><!-- #access --> 51 32 -
wp-content/themes/twentyten/attachment.php
5 5 6 6 <?php the_post(); ?> 7 7 8 <p class="page-title"><a href="<?php echo get_permalink($post->post_parent) ?>" title="<?php printf( esc_attr__( 'Return to %s', 'twentyten' ), wp_specialchars( get_the_title($post->post_parent), 1 ) ) ?>" rel="gallery">← <?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_attr( get_the_title($post->post_parent), 1 ) ); ?>" rel="gallery">← <?php echo get_the_title($post->post_parent); ?></a></p> 9 9 10 10 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 11 11 <h2 class="entry-title"><?php the_title(); ?></h2> 12 12 13 13 <div class="entry-meta"> 14 <span class="meta-prep meta-prep-author"><?php _e( 'By ', 'twentyten'); ?></span>14 <span class="meta-prep meta-prep-author"><?php _e( 'By ', 'twentyten' ); ?></span> 15 15 <span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( $authordata->ID, $authordata->user_nicename ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), $authordata->display_name ); ?>"><?php the_author(); ?></a></span> 16 16 <span class="meta-sep"> | </span> 17 <span class="meta-prep meta-prep-entry-date"><?php _e( 'Published ', 'twentyten'); ?></span>18 <span class="entry-date"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO') ?>"><?php the_time( get_option( 'date_format') ); ?></abbr></span>19 <?php edit_post_link( __( 'Edit', 'twentyten' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t" ) ?>17 <span class="meta-prep meta-prep-entry-date"><?php _e( 'Published ', 'twentyten' ); ?></span> 18 <span class="entry-date"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO'); ?>"><?php the_time( get_option('date_format') ); ?></abbr></span> 19 <?php edit_post_link( __( 'Edit', 'twentyten' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t" ); ?> 20 20 </div><!-- .entry-meta --> 21 21 22 22 <div class="entry-content"> 23 23 <div class="entry-attachment"> 24 <?php if ( wp_attachment_is_image( $post->id ) ) : $att_image = wp_get_attachment_image_src( $post->id, array(640,640) ); ?>24 <?php if ( wp_attachment_is_image( $post->id ) ) : $att_image = wp_get_attachment_image_src( $post->id, array(640,640) ); ?> 25 25 <p class="attachment"><a href="<?php echo wp_get_attachment_url($post->id); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><img src="<?php echo $att_image[0];?>" width="<?php echo $att_image[1];?>" height="<?php echo $att_image[2];?>" class="attachment-medium" alt="<?php $post->post_excerpt; ?>" /></a> 26 26 </p> 27 27 … … 31 31 <div class="nav-next"><?php next_image_link( false ); ?></div> 32 32 </div><!-- #nav-below --> 33 33 <?php else : ?> 34 <a href="<?php echo wp_get_attachment_url($post->ID) ?>" title="<?php echo esc_attr( get_the_title($post->ID) ); ?>" rel="attachment"><?php echo basename($post->guid)?></a>34 <a href="<?php echo wp_get_attachment_url($post->ID); ?>" title="<?php echo esc_attr( get_the_title($post->ID) ); ?>" rel="attachment"><?php echo basename($post->guid); ?></a> 35 35 <?php endif; ?> 36 36 </div> 37 <div class="entry-caption"><?php if ( !empty($post->post_excerpt) ) the_excerpt() ?></div>37 <div class="entry-caption"><?php if ( !empty($post->post_excerpt) ) the_excerpt(); ?></div> 38 38 39 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) 40 <?php wp_link_pages( 'before=<div class="page-link">' . __( 'Pages:', 'twentyten' ) . '&after=</div>')?>39 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> 40 <?php wp_link_pages( 'before=<div class="page-link">' . __( 'Pages:', 'twentyten' ) . '&after=</div>' ); ?> 41 41 42 42 </div><!-- .entry-content --> 43 43 44 44 <div class="entry-utility"> 45 45 <?php printf( __( 'This entry was posted in %1$s%2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>. Follow any comments here with the <a href="%5$s" title="Comments RSS to %4$s" rel="alternate" type="application/rss+xml">RSS feed for this post</a>.', 'twentyten' ), 46 get_the_category_list( ', '),46 get_the_category_list( ', ' ), 47 47 get_the_tag_list( __( ' and tagged ', 'twentyten' ), ', ', '' ), 48 48 get_permalink(), 49 the_title_attribute( 'echo=0'),50 comments_rss() ) ?>49 the_title_attribute( 'echo=0' ), 50 comments_rss() ); ?> 51 51 52 52 <?php if ( comments_open() && pings_open() ) : // Comments and trackbacks open ?> 53 <?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() ) ?>53 <?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() ); ?> 54 54 <?php elseif ( !comments_open() && pings_open() ) : // Only trackbacks open ?> 55 <?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() ) ?>55 <?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() ); ?> 56 56 <?php elseif ( comments_open() && !pings_open() ) : // Only comments open ?> 57 <?php _e( 'Trackbacks are closed, but you can <a class="comment-link" href="#respond" title="Post a comment">post a comment</a>.', 'twentyten' ) ?>57 <?php _e( 'Trackbacks are closed, but you can <a class="comment-link" href="#respond" title="Post a comment">post a comment</a>.', 'twentyten' ); ?> 58 58 <?php elseif ( !comments_open() && !pings_open() ) : // Comments and trackbacks closed ?> 59 <?php _e( 'Both comments and trackbacks are currently closed.', 'twentyten' ) ?>59 <?php _e( 'Both comments and trackbacks are currently closed.', 'twentyten' ); ?> 60 60 <?php endif; ?> 61 <?php edit_post_link( __( 'Edit', 'twentyten' ), "\n\t\t\t\t\t<span class=\"edit-link\">", "</span>" ) ?>61 <?php edit_post_link( __( 'Edit', 'twentyten' ), "\n\t\t\t\t\t<span class=\"edit-link\">", "</span>" ); ?> 62 62 </div><!-- .entry-utility --> 63 63 </div><!-- #post-<?php the_ID(); ?> --> 64 64 65 <?php comments_template(); ?>65 <?php <?php comments_template( '', true ); ?>(); ?> 66 66 67 67 </div><!-- #content --> 68 68 </div><!-- #container -->