Changeset 13147
- Timestamp:
- 02/14/2010 10:02:38 AM (14 years ago)
- Location:
- trunk/wp-content/themes/twentyten
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentyten/attachment.php
r13129 r13147 13 13 <div class="entry-meta"> 14 14 <span class="meta-prep meta-prep-author"><?php _e( 'By ', 'twentyten' ); ?></span> 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>15 <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' ), $authordata->display_name ); ?>"><?php the_author(); ?></a></span> 16 16 <span class="meta-sep"><?php _e( ' | ', 'twentyten' ); ?></span> 17 17 <span class="meta-prep meta-prep-entry-date"><?php _e( 'Published ', 'twentyten' ); ?></span> -
trunk/wp-content/themes/twentyten/author.php
r13146 r13147 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(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> 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 ?> -
trunk/wp-content/themes/twentyten/functions.php
r13144 r13147 119 119 add_filter( 'gallery_style', 'twentyten_remove_gallery_css' ); 120 120 121 122 // For category lists on category archives: Returns other categories except the current one (redundant) 123 function cats_meow( $glue ) { 124 $current_cat = single_cat_title( '', false ); 125 $separator = "\n"; 126 $cats = explode( $separator, get_the_category_list($separator) ); 127 foreach ( $cats as $i => $str ) { 128 if ( strstr( $str, ">$current_cat<" ) ) { 129 unset( $cats[$i] ); 130 break; 121 function twentyten_cat_list() { 122 return twentyten_term_list('category', ', ', __('Posted in %s', 'twentyten'), __('Also posted in %s', 'twentyten') ); 123 } 124 function twentyten_tag_list() { 125 return twentyten_term_list('post_tag', ', ', __('Tagged %s', 'twentyten'), __('Also tagged %s', 'twentyten') ); 126 } 127 function twentyten_term_list($taxonomy, $glue = ', ', $text = '', $also_text = '') { 128 global $wp_query, $post; 129 $current_term = $wp_query->queried_object; 130 $terms = wp_get_object_terms($post->ID, $taxonomy); 131 // If we're viewing a Taxonomy page.. 132 if ( isset($current_term->taxonomy) && $taxonomy == $current_term->taxonomy ) { 133 // Remove the term from display. 134 foreach ( (array)$terms as $key => $term ) { 135 if ( $term->term_id == $current_term->term_id ) { 136 unset($terms[$key]); 137 break; 138 } 131 139 } 140 // Change to Also text as we've now removed something from the terms list. 141 $text = $also_text; 132 142 } 133 if ( empty($cats) ) 134 return false; 135 136 return trim( join( $glue, $cats ) ); 137 } // end cats_meow 138 139 140 // For tag lists on tag archives: Returns other tags except the current one (redundant) 141 function tag_ur_it( $glue ) { 142 $current_tag = single_tag_title( '', '', false ); 143 $separator = "\n"; 144 $tags = explode( $separator, get_the_tag_list( "", "$separator", "" ) ); 145 foreach ( $tags as $i => $str ) { 146 if ( strstr( $str, ">$current_tag<" ) ) { 147 unset( $tags[$i] ); 148 break; 149 } 143 $tlist = array(); 144 $rel = 'category' == $taxonomy ? 'rel="category"' : 'rel="tag"'; 145 foreach ( (array)$terms as $term ) { 146 $tlist[] = '<a href="' . get_term_link( $term, $taxonomy ) . '" title="' . esc_attr( sprintf( __( 'View all posts in %s', 'twentyten' ), $term->name ) ) . '" ' . $rel . '>' . $term->name . '</a>'; 150 147 } 151 if ( empty($tags) ) 152 return false; 153 154 return trim( join( $glue, $tags ) ); 155 } // end tag_ur_it 148 if ( !empty($tlist) ) 149 return sprintf($text, join($glue, $tlist)); 150 return ''; 151 } 156 152 157 153 // Register widgetized areas -
trunk/wp-content/themes/twentyten/loop.php
r13141 r13147 15 15 <a href="<?php the_permalink(); ?>" title="<?php the_time(); ?>" rel="bookmark"><span class="entry-date"><?php echo get_the_date(); ?></span></a> 16 16 <span class="meta-sep"> <?php _e( 'by ', 'twentyten' ); ?> </span> 17 <span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( $authordata->ID); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ); ?>"><?php the_author(); ?></a></span>17 <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 18 </div><!-- .entry-meta --> 19 19 … … 47 47 <?php } elseif ( in_category( 'asides' ) ) { ?> 48 48 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 49 <?php if ( is_archive() || is_search() ) : //Only display Excerpts for archives & search ?> 50 <div class="entry-summary"> 51 <?php the_excerpt( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> 52 </div><!-- .entry-summary --> 53 <?php else : ?> 49 54 <div class="entry-content"> 50 55 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> 51 56 </div><!-- .entry-content --> 57 <?php endif; ?> 52 58 53 59 <div class="entry-utility"> … … 55 61 <a href="<?php the_permalink(); ?>" title="<?php the_time(); ?>" rel="bookmark"><span class="entry-date"><?php echo get_the_date(); ?></span></a> 56 62 <span class="meta-sep"> <?php _e( ' by ', 'twentyten' ); ?> </span> 57 <span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( $authordata->ID); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ); ?>"><?php the_author(); ?></a></span>58 <span class="meta-sep"><?php _ _( ' | ', 'twentyten' ); ?></span>63 <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> 64 <span class="meta-sep"><?php _e( ' | ', 'twentyten' ); ?></span> 59 65 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span> 60 66 <?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" ); ?> … … 72 78 the_permalink(); ?>" title="<?php the_time(); ?>" rel="bookmark"><span class="entry-date"><?php echo get_the_date(); ?></span></a> 73 79 <span class="meta-sep"><?php _e( ' by ', 'twentyten' ); ?></span> 74 <span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( $authordata->ID); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ); ?>"><?php the_author(); ?></a></span>80 <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> 75 81 </div><!-- .entry-meta --> 76 82 … … 87 93 88 94 <div class="entry-utility"> 89 <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> 90 <span class="meta-sep"><?php __( ' | ', 'twentyten' ); ?></span> 91 <?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" ); ?> 95 <span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php echo twentyten_cat_list(); ?></span></span> 96 <span class="meta-sep"><?php _e( ' | ', 'twentyten' ); ?></span> 97 <?php $tags_text = twentyten_tag_list(); ?> 98 <?php if ( !empty($tags_text) ) : ?> 99 <span class="tag-links"><span class="entry-utility-prep entry-utility-prep-tag-links"><?php echo $tags_text; ?></span></span> 100 <span class="meta-sep"><?php _e( ' | ', 'twentyten' ); ?></span> 101 <?php endif; //$tags_text ?> 92 102 <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span> 93 103 <?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" ); ?> -
trunk/wp-content/themes/twentyten/single.php
r13128 r13147 16 16 <div class="entry-meta"> 17 17 <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( $authordata->ID, $authordata->user_nicename); ?>" 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> 19 19 <span class="meta-sep"><?php _e( ' on ', 'twentyten' ); ?> </span> 20 20 <a href="<?php the_permalink(); ?>" title="<?php the_time(); ?>" rel="bookmark"><span class="entry-date"><?php echo get_the_date(); ?></span></a> … … 36 36 <?php the_author_meta('description'); ?> 37 37 <div id="author-link"> 38 <a href="<?php echo get_author_posts_url( $authordata->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(); ?> →</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(); ?> →</a> 39 39 </div><!-- #author-link --> 40 40 </div><!-- #author-description -->
Note: See TracChangeset
for help on using the changeset viewer.