WordPress.org

Make WordPress Core

Changeset 15391


Ignore:
Timestamp:
07/12/2010 07:39:59 PM (8 years ago)
Author:
nacin
Message:

Update to Twenty Ten 1.0.3 from theme dir. see #14284.

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  
    1515<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
    1616
    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">&larr;</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">&larr;</span> %s', 'twentyten' ), get_the_title( $post->post_parent ) );
     21                    ?></a></p>
     22                <?php endif; ?>
    2123
    2224                <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  • branches/3.0/wp-content/themes/twentyten/editor-style.css

    r14863 r15391  
    4040}
    4141hr {
    42     background-color: #E7E7E7;
     42    background-color: #e7e7e7;
    4343    border:0;
    4444    height: 1px;
     
    9696}
    9797ins {
    98     background: #FFFFCC;
     98    background: #ffffcc;
    9999    border: none;
    100100    color: #333;
     
    143143}
    144144a:link {
    145     color:#0066CC;
     145    color:#0066cc;
    146146}
    147147a:visited {
     
    150150a:active,
    151151a:hover {
    152     color: #FF4B33;
     152    color: #ff4b33;
    153153}
    154154p,
  • branches/3.0/wp-content/themes/twentyten/functions.php

    r15261 r15391  
    203203}
    204204endif;
    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 posts
    210  * 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 search
    214  * 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.0
    219  *
    220  * @param string $title Title generated by wp_title()
    221  * @param string $separator The separator passed to wp_title(). Twenty Ten uses a
    222  *  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 );
    263205
    264206/**
  • branches/3.0/wp-content/themes/twentyten/header.php

    r15195 r15391  
    1616    /*
    1717     * Print the <title> tag based on what is being viewed.
    18      * We filter the output of wp_title() a bit -- see
    19      * twentyten_filter_wp_title() in functions.php.
    2018     */
     19    global $page, $paged;
     20
    2121    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 ) );
    2234
    2335    ?></title>
  • branches/3.0/wp-content/themes/twentyten/loop.php

    r15247 r15391  
    6969<?php if ( post_password_required() ) : ?>
    7070                <?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(); ?>
    8788<?php endif; ?>
    8889            </div><!-- .entry-content -->
  • branches/3.0/wp-content/themes/twentyten/style.css

    r15164 r15391  
    77Tags: black, blue, white, two-columns, fixed-width, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style
    88*/
    9 
    109
    1110/* 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.