Changeset 15391
- Timestamp:
- 07/12/2010 07:39:59 PM (14 years ago)
- Location:
- branches/3.0/wp-content/themes/twentyten
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/wp-content/themes/twentyten/attachment.php
r15226 r15391 15 15 <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> 16 16 17 <p class="page-title"><a href="<?php echo get_permalink( $post->post_parent ); ?>" title="<?php esc_attr( printf( __( 'Return to %s', 'twentyten' ), get_the_title( $post->post_parent ) ) ); ?>" rel="gallery"><?php 18 /* translators: %s - title of parent post */ 19 printf( __( '<span class="meta-nav">←</span> %s', 'twentyten' ), get_the_title( $post->post_parent ) ); 20 ?></a></p> 17 <?php if ( ! empty( $post->post_parent ) ) : ?> 18 <p class="page-title"><a href="<?php echo get_permalink( $post->post_parent ); ?>" title="<?php esc_attr( printf( __( 'Return to %s', 'twentyten' ), get_the_title( $post->post_parent ) ) ); ?>" rel="gallery"><?php 19 /* translators: %s - title of parent post */ 20 printf( __( '<span class="meta-nav">←</span> %s', 'twentyten' ), get_the_title( $post->post_parent ) ); 21 ?></a></p> 22 <?php endif; ?> 21 23 22 24 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> -
branches/3.0/wp-content/themes/twentyten/editor-style.css
r14863 r15391 40 40 } 41 41 hr { 42 background-color: # E7E7E7;42 background-color: #e7e7e7; 43 43 border:0; 44 44 height: 1px; … … 96 96 } 97 97 ins { 98 background: # FFFFCC;98 background: #ffffcc; 99 99 border: none; 100 100 color: #333; … … 143 143 } 144 144 a:link { 145 color:#0066 CC;145 color:#0066cc; 146 146 } 147 147 a:visited { … … 150 150 a:active, 151 151 a:hover { 152 color: # FF4B33;152 color: #ff4b33; 153 153 } 154 154 p, -
branches/3.0/wp-content/themes/twentyten/functions.php
r15261 r15391 203 203 } 204 204 endif; 205 206 /**207 * Makes some changes to the <title> tag, by filtering the output of wp_title().208 *209 * If we have a site description and we're viewing the home page or a blog posts210 * page (when using a static front page), then we will add the site description.211 *212 * If we're viewing a search result, then we're going to recreate the title entirely.213 * We're going to add page numbers to all titles as well, to the middle of a search214 * result title and the end of all other titles.215 *216 * The site title also gets added to all titles.217 *218 * @since Twenty Ten 1.0219 *220 * @param string $title Title generated by wp_title()221 * @param string $separator The separator passed to wp_title(). Twenty Ten uses a222 * vertical bar, "|", as a separator in header.php.223 * @return string The new title, ready for the <title> tag.224 */225 function twentyten_filter_wp_title( $title, $separator ) {226 // Don't affect wp_title() calls in feeds.227 if ( is_feed() )228 return $title;229 230 // The $paged global variable contains the page number of a listing of posts.231 // The $page global variable contains the page number of a single post that is paged.232 // We'll display whichever one applies, if we're not looking at the first page.233 global $paged, $page;234 235 if ( is_search() ) {236 // If we're a search, let's start over:237 $title = sprintf( __( 'Search results for %s', 'twentyten' ), '"' . get_search_query() . '"' );238 // Add a page number if we're on page 2 or more:239 if ( $paged >= 2 )240 $title .= " $separator " . sprintf( __( 'Page %s', 'twentyten' ), $paged );241 // Add the site name to the end:242 $title .= " $separator " . get_bloginfo( 'name', 'display' );243 // We're done. Let's send the new title back to wp_title():244 return $title;245 }246 247 // Otherwise, let's start by adding the site name to the end:248 $title .= get_bloginfo( 'name', 'display' );249 250 // If we have a site description and we're on the home/front page, add the description:251 $site_description = get_bloginfo( 'description', 'display' );252 if ( $site_description && ( is_home() || is_front_page() ) )253 $title .= " $separator " . $site_description;254 255 // Add a page number if necessary:256 if ( $paged >= 2 || $page >= 2 )257 $title .= " $separator " . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) );258 259 // Return the new title to wp_title():260 return $title;261 }262 add_filter( 'wp_title', 'twentyten_filter_wp_title', 10, 2 );263 205 264 206 /** -
branches/3.0/wp-content/themes/twentyten/header.php
r15195 r15391 16 16 /* 17 17 * Print the <title> tag based on what is being viewed. 18 * We filter the output of wp_title() a bit -- see19 * twentyten_filter_wp_title() in functions.php.20 18 */ 19 global $page, $paged; 20 21 21 wp_title( '|', true, 'right' ); 22 23 // Add the blog name. 24 bloginfo( 'name' ); 25 26 // Add the blog description for the home/front page. 27 $site_description = get_bloginfo( 'description', 'display' ); 28 if ( $site_description && ( is_home() || is_front_page() ) ) 29 echo " | $site_description"; 30 31 // Add a page number if necessary: 32 if ( $paged >= 2 || $page >= 2 ) 33 echo ' | ' . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) ); 22 34 23 35 ?></title> -
branches/3.0/wp-content/themes/twentyten/loop.php
r15247 r15391 69 69 <?php if ( post_password_required() ) : ?> 70 70 <?php the_content(); ?> 71 <?php else : ?> 72 <div class="gallery-thumb"> 73 <?php 74 $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) ); 75 $total_images = count( $images ); 76 $image = array_shift( $images ); 77 $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' ); 78 ?> 79 <a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a> 80 </div><!-- .gallery-thumb --> 81 <p><em><?php printf( __( 'This gallery contains <a %1$s>%2$s photos</a>.', 'twentyten' ), 82 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', 83 $total_images 84 ); ?></em></p> 85 86 <?php the_excerpt(); ?> 71 <?php else : ?> 72 <?php 73 $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) ); 74 if ( $images ) : 75 $total_images = count( $images ); 76 $image = array_shift( $images ); 77 $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' ); 78 ?> 79 <div class="gallery-thumb"> 80 <a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a> 81 </div><!-- .gallery-thumb --> 82 <p><em><?php printf( __( 'This gallery contains <a %1$s>%2$s photos</a>.', 'twentyten' ), 83 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', 84 $total_images 85 ); ?></em></p> 86 <?php endif; ?> 87 <?php the_excerpt(); ?> 87 88 <?php endif; ?> 88 89 </div><!-- .entry-content --> -
branches/3.0/wp-content/themes/twentyten/style.css
r15164 r15391 7 7 Tags: black, blue, white, two-columns, fixed-width, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style 8 8 */ 9 10 9 11 10 /* Reset default browser CSS. Based on work by Eric Meyer: http://meyerweb.com/eric/tools/css/reset/index.html
Note: See TracChangeset
for help on using the changeset viewer.