Make WordPress Core

Changeset 16628


Ignore:
Timestamp:
11/30/2010 08:29:25 PM (16 years ago)
Author:
nacin
Message:

Merge Twenty Ten 1.1 to the 3.0 branch.

Location:
branches/3.0/wp-content/themes/twentyten
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/wp-content/themes/twentyten/attachment.php

    r15787 r16628  
    1313                        <div id="content" role="main">
    1414
    15                         <?php
    16                         /* Run the loop to output the attachment.
    17                          * If you want to overload this in a child theme then include a file
    18                          * called loop-attachment.php and that will be used instead.
    19                          */
    20                         get_template_part( 'loop', 'attachment' );
    21                         ?>
     15<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
     16
     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; ?>
     23
     24                                <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
     25                                        <h2 class="entry-title"><?php the_title(); ?></h2>
     26
     27                                        <div class="entry-meta">
     28                                                <?php
     29                                                        printf(__('<span class="%1$s">By</span> %2$s', 'twentyten'),
     30                                                                'meta-prep meta-prep-author',
     31                                                                sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
     32                                                                        get_author_posts_url( get_the_author_meta( 'ID' ) ),
     33                                                                        sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),
     34                                                                        get_the_author()
     35                                                                )
     36                                                        );
     37                                                ?>
     38                                                <span class="meta-sep">|</span>
     39                                                <?php
     40                                                        printf( __('<span class="%1$s">Published</span> %2$s', 'twentyten'),
     41                                                                'meta-prep meta-prep-entry-date',
     42                                                                sprintf( '<span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr></span>',
     43                                                                        esc_attr( get_the_time() ),
     44                                                                        get_the_date()
     45                                                                )
     46                                                        );
     47                                                        if ( wp_attachment_is_image() ) {
     48                                                                echo ' <span class="meta-sep">|</span> ';
     49                                                                $metadata = wp_get_attachment_metadata();
     50                                                                printf( __( 'Full size is %s pixels', 'twentyten'),
     51                                                                        sprintf( '<a href="%1$s" title="%2$s">%3$s &times; %4$s</a>',
     52                                                                                wp_get_attachment_url(),
     53                                                                                esc_attr( __('Link to full-size image', 'twentyten') ),
     54                                                                                $metadata['width'],
     55                                                                                $metadata['height']
     56                                                                        )
     57                                                                );
     58                                                        }
     59                                                ?>
     60                                                <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
     61                                        </div><!-- .entry-meta -->
     62
     63                                        <div class="entry-content">
     64                                                <div class="entry-attachment">
     65<?php if ( wp_attachment_is_image() ) :
     66        $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) );
     67        foreach ( $attachments as $k => $attachment ) {
     68                if ( $attachment->ID == $post->ID )
     69                        break;
     70        }
     71        $k++;
     72        // If there is more than 1 image attachment in a gallery
     73        if ( count( $attachments ) > 1 ) {
     74                if ( isset( $attachments[ $k ] ) )
     75                        // get the URL of the next image attachment
     76                        $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
     77                else
     78                        // or get the URL of the first image attachment
     79                        $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
     80        } else {
     81                // or, if there's only 1 image attachment, get the URL of the image
     82                $next_attachment_url = wp_get_attachment_url();
     83        }
     84?>
     85                                                <p class="attachment"><a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
     86                                                        $attachment_size = apply_filters( 'twentyten_attachment_size', 900 );
     87                                                        echo wp_get_attachment_image( $post->ID, array( $attachment_size, 9999 ) ); // filterable image width with, essentially, no limit for image height.
     88                                                ?></a></p>
     89
     90                                                <div id="nav-below" class="navigation">
     91                                                        <div class="nav-previous"><?php previous_image_link( false ); ?></div>
     92                                                        <div class="nav-next"><?php next_image_link( false ); ?></div>
     93                                                </div><!-- #nav-below -->
     94<?php else : ?>
     95                                                <a href="<?php echo wp_get_attachment_url(); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php echo basename( get_permalink() ); ?></a>
     96<?php endif; ?>
     97                                                </div><!-- .entry-attachment -->
     98                                                <div class="entry-caption"><?php if ( !empty( $post->post_excerpt ) ) the_excerpt(); ?></div>
     99
     100<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
     101<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
     102
     103                                        </div><!-- .entry-content -->
     104
     105                                        <div class="entry-utility">
     106                                                <?php twentyten_posted_in(); ?>
     107                                                <?php edit_post_link( __( 'Edit', 'twentyten' ), ' <span class="edit-link">', '</span>' ); ?>
     108                                        </div><!-- .entry-utility -->
     109                                </div><!-- #post-## -->
     110
     111<?php comments_template(); ?>
     112
     113<?php endwhile; ?>
    22114
    23115                        </div><!-- #content -->
  • branches/3.0/wp-content/themes/twentyten/editor-style.css

    r15786 r16628  
    11/*
    22Theme Name: Twenty Ten
    3 Description: Used to style the TinyMCE editor.
     3*/
     4/*
     5Used to style the TinyMCE editor.
    46*/
    57html .mceContentBody {
    6         max-width: 640px;
     8        max-width:640px;
    79}
    810* {
     11        font-family: Georgia, "Bitstream Charter", serif;
    912        color: #444;
    10         font-family: Georgia, "Bitstream Charter", serif;
    1113        line-height: 1.5;
    1214}
     
    3941hr {
    4042        background-color: #e7e7e7;
    41         border: 0;
    42         clear: both;
     43        border:0;
    4344        height: 1px;
    4445        margin-bottom: 18px;
     46        clear:both;
    4547}
    4648/* Text elements */
     
    5759}
    5860ol ol {
    59         list-style: upper-alpha;
     61        list-style:upper-alpha;
    6062}
    6163ol ol ol {
    62         list-style: lower-roman;
     64        list-style:lower-roman;
    6365}
    6466ol ol ol ol {
    65         list-style: lower-alpha;
     67        list-style:lower-alpha;
    6668}
    6769ul ul,
     
    6971ul ol,
    7072ol ul {
    71         margin-bottom: 0;
     73        margin-bottom:0;
    7274}
    7375dl {
    74         margin: 0 0 24px 0;
     76        margin:0 0 24px 0;
    7577}
    7678dt {
     
    8183}
    8284strong {
     85        font-weight: bold;
    8386        color: #000;
    84         font-weight: bold;
    8587}
    8688cite,
    8789em,
    8890i {
     91        font-style: italic;
    8992        border: none;
    90         font-style: italic;
    9193}
    9294big {
     
    9496}
    9597ins {
    96         background: #ffc;
     98        background: #ffffcc;
    9799        border: none;
    98100        color: #333;
     
    128130sup,
    129131sub {
    130         font-size: 10px;
    131132        height: 0;
    132133        line-height: 1;
     134        vertical-align: baseline;
    133135        position: relative;
    134         vertical-align: baseline;
     136        font-size: 10px;
    135137}
    136138sup {
     
    141143}
    142144a:link {
    143         color: #06c;
     145        color:#0066cc;
    144146}
    145147a:visited {
    146         color: #743399;
     148        color:#743399;
    147149}
    148150a:active,
     
    156158pre,
    157159hr {
    158         margin-bottom: 24px;
     160        margin-bottom:24px;
    159161}
    160162ul ul,
     
    162164ul ol,
    163165ol ul {
    164         margin-bottom: 0;
     166        margin-bottom:0;
    165167}
    166168pre,
     
    187189h6 {
    188190        color: #000;
     191        margin: 0 0 20px 0;
     192        line-height: 1.5em;
    189193        font-weight: normal;
    190         line-height: 1.5em;
    191         margin: 0 0 20px 0;
    192194}
    193195h1 {
     
    211213table {
    212214        border: 1px solid #e7e7e7 !important;
     215        text-align: left;
     216        margin: 0 -1px 24px 0;
     217        width: 100%;
    213218        border-collapse: collapse;
    214219        border-spacing: 0;
    215         margin: 0 -1px 24px 0;
    216         text-align: left;
    217         width: 100%;
    218220}
    219221tr th,
     
    231233        padding: 6px 24px;
    232234}
     235
     236
    233237img {
    234238        margin: 0;
    235 }
    236 img.size-auto,
    237 img.size-large,
    238 img.size-full,
    239 img.size-medium {
    240         max-width: 100%;
    241         height: auto;
     239        max-width: 640px;
    242240}
    243241.alignleft,
     
    268266}
    269267.wp-caption {
     268        border: none;
    270269        background: #f1f1f1;
    271         border: none;
     270        color: #888;
     271        font-size: 12px;
     272        line-height: 18px;
     273        text-align: center;
     274        margin-bottom: 20px;
     275        padding: 4px;
     276        -moz-border-radius: 0;
    272277        -khtml-border-radius: 0;
    273         -moz-border-radius: 0;
    274278        -webkit-border-radius: 0;
    275279        border-radius: 0;
    276         color: #888;
    277         font-size: 12px;
    278         line-height: 18px;
    279         margin-bottom: 20px;
    280         max-width: 632px !important; /* prevent too-wide images from breaking layout */
    281         padding: 4px;
    282         text-align: center;
    283280}
    284281.wp-caption img {
     
    289286}
    290287.wp-smiley {
    291         margin: 0;
    292 }
     288        margin:0;
     289}
  • branches/3.0/wp-content/themes/twentyten/header.php

    r15783 r16628  
    7474                                                // Houston, we have a new header image!
    7575                                                echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
    76                                         elseif ( get_header_image() ) : ?>
     76                                        else : ?>
    7777                                                <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
    7878                                        <?php endif; ?>
  • branches/3.0/wp-content/themes/twentyten/onecolumn-page.php

    r15787 r16628  
    1818                        <div id="content" role="main">
    1919
    20                         <?php
    21                         /* Run the loop to output the page.
    22                          * If you want to overload this in a child theme then include a file
    23                          * called loop-page.php and that will be used instead.
    24                          */
    25                          get_template_part( 'loop', 'page' );
    26                         ?>
     20<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
     21
     22                                <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
     23                                        <h1 class="entry-title"><?php the_title(); ?></h1>
     24                                        <div class="entry-content">
     25                                                <?php the_content(); ?>
     26                                                <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
     27                                                <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
     28                                        </div><!-- .entry-content -->
     29                                </div><!-- #post-## -->
     30
     31                                <?php comments_template( '', true ); ?>
     32
     33<?php endwhile; ?>
    2734
    2835                        </div><!-- #content -->
  • branches/3.0/wp-content/themes/twentyten/page.php

    r15787 r16628  
    1818                        <div id="content" role="main">
    1919
    20                         <?php
    21                         /* Run the loop to output the page.
    22                          * If you want to overload this in a child theme then include a file
    23                          * called loop-page.php and that will be used instead.
    24                          */
    25                         get_template_part( 'loop', 'page' );
    26                         ?>
     20<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
     21
     22                                <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
     23                                        <?php if ( is_front_page() ) { ?>
     24                                                <h2 class="entry-title"><?php the_title(); ?></h2>
     25                                        <?php } else { ?>
     26                                                <h1 class="entry-title"><?php the_title(); ?></h1>
     27                                        <?php } ?>
     28
     29                                        <div class="entry-content">
     30                                                <?php the_content(); ?>
     31                                                <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
     32                                                <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
     33                                        </div><!-- .entry-content -->
     34                                </div><!-- #post-## -->
     35
     36                                <?php comments_template( '', true ); ?>
     37
     38<?php endwhile; ?>
    2739
    2840                        </div><!-- #content -->
  • branches/3.0/wp-content/themes/twentyten/rtl.css

    r15784 r16628  
    121121        font-style: normal;
    122122}
    123 #branding img {
    124         float: right;
    125 }
    126123
    127124/* =Menu
  • branches/3.0/wp-content/themes/twentyten/single.php

    r15787 r16628  
    1313                        <div id="content" role="main">
    1414
    15                         <?php
    16                         /* Run the loop to output the post.
    17                          * If you want to overload this in a child theme then include a file
    18                          * called loop-single.php and that will be used instead.
    19                          */
    20                         get_template_part( 'loop', 'single' );
    21                         ?>
     15<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
     16
     17                                <div id="nav-above" class="navigation">
     18                                        <div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div>
     19                                        <div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten' ) . '</span>' ); ?></div>
     20                                </div><!-- #nav-above -->
     21
     22                                <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
     23                                        <h1 class="entry-title"><?php the_title(); ?></h1>
     24
     25                                        <div class="entry-meta">
     26                                                <?php twentyten_posted_on(); ?>
     27                                        </div><!-- .entry-meta -->
     28
     29                                        <div class="entry-content">
     30                                                <?php the_content(); ?>
     31                                                <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
     32                                        </div><!-- .entry-content -->
     33
     34<?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries  ?>
     35                                        <div id="entry-author-info">
     36                                                <div id="author-avatar">
     37                                                        <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?>
     38                                                </div><!-- #author-avatar -->
     39                                                <div id="author-description">
     40                                                        <h2><?php printf( esc_attr__( 'About %s', 'twentyten' ), get_the_author() ); ?></h2>
     41                                                        <?php the_author_meta( 'description' ); ?>
     42                                                        <div id="author-link">
     43                                                                <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>">
     44                                                                        <?php printf( __( 'View all posts by %s <span class="meta-nav">&rarr;</span>', 'twentyten' ), get_the_author() ); ?>
     45                                                                </a>
     46                                                        </div><!-- #author-link -->
     47                                                </div><!-- #author-description -->
     48                                        </div><!-- #entry-author-info -->
     49<?php endif; ?>
     50
     51                                        <div class="entry-utility">
     52                                                <?php twentyten_posted_in(); ?>
     53                                                <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
     54                                        </div><!-- .entry-utility -->
     55                                </div><!-- #post-## -->
     56
     57                                <div id="nav-below" class="navigation">
     58                                        <div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div>
     59                                        <div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten' ) . '</span>' ); ?></div>
     60                                </div><!-- #nav-below -->
     61
     62                                <?php comments_template( '', true ); ?>
     63
     64<?php endwhile; // end of the loop. ?>
    2265
    2366                        </div><!-- #content -->
  • branches/3.0/wp-content/themes/twentyten/style.css

    r16217 r16628  
    44Description: The 2010 theme for WordPress is stylish, customizable, simple, and readable -- make it yours with a custom menu, header image, and background. Twenty Ten supports six widgetized areas (two in the sidebar, four in the footer) and featured images (thumbnails for gallery posts and custom header images for posts and pages). It includes stylesheets for print and the admin Visual Editor, special styles for posts in the "Asides" and "Gallery" categories, and has an optional one-column page template that removes the sidebar.
    55Author: the WordPress team
    6 Version: 1.2-RC1
    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, custom-menu
     6Version: 1.1
     7Tags: black, blue, white, two-columns, fixed-width, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style
    88*/
    99
     
    140140.reply,
    141141.widget-title,
    142 .wp-caption-text {
    143         font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif;
    144 }
     142.wp-caption-text,
    145143input[type=submit] {
    146144        font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif;
     
    353351        float: right;
    354352        font-style: italic;
    355         margin: 15px 0 18px 0;
     353        margin: 14px 0 18px 0;
    356354        width: 220px;
    357355}
     
    361359        border-top: 4px solid #000;
    362360        border-bottom: 1px solid #000;
     361        clear: both;
    363362        display: block;
    364         float: left;
    365363}
    366364
     
    762760-------------------------------------------------------------- */
    763761
    764 /*
    765 Resize images to fit the main content area.
    766 - Applies only to images uploaded via WordPress by targeting size-* classes.
    767 - Other images will be left alone. Use "size-auto" class to apply to other images.
    768 */
    769 img.size-auto,
    770 img.size-full,
    771 img.size-large,
    772 img.size-medium,
    773 .attachment img {
    774         max-width: 100%; /* When images are too wide for containing element, force them to fit. */
    775         height: auto; /* Override height to match resized width for correct aspect ratio. */
    776 }
    777 .alignleft,
    778 img.alignleft {
     762#content img {
     763        margin: 0;
     764        height: auto;
     765        max-width: 640px;
     766        width: auto;
     767}
     768#content .attachment img {
     769        max-width: 900px;
     770}
     771#content .alignleft,
     772#content img.alignleft {
    779773        display: inline;
    780774        float: left;
     
    782776        margin-top: 4px;
    783777}
    784 .alignright,
    785 img.alignright {
     778#content .alignright,
     779#content img.alignright {
    786780        display: inline;
    787781        float: right;
     
    789783        margin-top: 4px;
    790784}
    791 .aligncenter,
    792 img.aligncenter {
     785#content .aligncenter,
     786#content img.aligncenter {
    793787        clear: both;
    794788        display: block;
     
    796790        margin-right: auto;
    797791}
    798 img.alignleft,
    799 img.alignright,
    800 img.aligncenter {
     792#content img.alignleft,
     793#content img.alignright,
     794#content img.aligncenter {
    801795        margin-bottom: 12px;
    802796}
    803 .wp-caption {
     797#content .wp-caption {
    804798        background: #f1f1f1;
    805799        line-height: 18px;
    806800        margin-bottom: 20px;
    807         max-width: 632px !important; /* prevent too-wide images from breaking layout */
    808801        padding: 4px;
    809802        text-align: center;
    810803}
    811 .wp-caption img {
     804#content .wp-caption img {
    812805        margin: 5px 5px 0;
    813806}
    814 .wp-caption p.wp-caption-text {
     807#content .wp-caption p.wp-caption-text {
    815808        color: #888;
    816809        font-size: 12px;
    817810        margin: 5px;
    818811}
    819 .wp-smiley {
     812#content .wp-smiley {
    820813        margin: 0;
    821814}
    822 .gallery {
     815#content .gallery {
    823816        margin: 0 auto 18px;
    824817}
    825 .gallery .gallery-item {
     818#content .gallery .gallery-item {
    826819        float: left;
    827820        margin-top: 0;
     
    829822        width: 33%;
    830823}
    831 .gallery img {
     824#content .gallery img {
    832825        border: 2px solid #cfcfcf;
    833826}
    834 .gallery .gallery-caption {
     827#content .gallery .gallery-caption {
    835828        color: #888;
    836829        font-size: 12px;
    837830        margin: 0 0 12px;
    838831}
    839 .gallery dl {
     832#content .gallery dl {
    840833        margin: 0;
    841834}
    842 .gallery img {
     835#content .gallery img {
    843836        border: 10px solid #f1f1f1;
    844837}
    845 .gallery br+br {
     838#content .gallery br+br {
    846839        display: none;
    847840}
    848 #content .attachment img {/* single attachment images should be centered */
     841#content .attachment img { /* single attachment images should be centered */
    849842        display: block;
    850843        margin: 0 auto;
     
    10941087        list-style: square;
    10951088        margin-left: 1.3em;
    1096 }
    1097 .widget-area select {
    1098         max-width: 100%;
    10991089}
    11001090.widget_search #s {/* This keeps the search inputs in line */
Note: See TracChangeset for help on using the changeset viewer.