Make WordPress Core

Changeset 14786


Ignore:
Timestamp:
05/21/2010 06:56:27 PM (14 years ago)
Author:
nacin
Message:

In Twenty Ten, final pass on inline docs et al. props jorbin, zeo. fixes #12695.

Location:
trunk/wp-content/themes/twentyten
Files:
11 edited

Legend:

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

    r14708 r14786  
    5252                                    )
    5353                                );
    54                             }                           
     54                            }
    5555                        ?>
    5656                        <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
     
    8383                        <a href="<?php echo wp_get_attachment_url(); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php echo basename( get_permalink() ); ?></a>
    8484<?php endif; ?>
    85                         </div>
     85                        </div><!-- .entry-attachment -->
    8686                        <div class="entry-caption"><?php if ( !empty( $post->post_excerpt ) ) the_excerpt(); ?></div>
    8787
  • trunk/wp-content/themes/twentyten/author.php

    r14708 r14786  
    3333                        <div id="author-avatar">
    3434                            <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?>
    35                         </div><!-- #author-avatar   -->
     35                        </div><!-- #author-avatar -->
    3636                        <div id="author-description">
    3737                            <h2><?php printf( __( 'About %s', 'twentyten' ), get_the_author() ); ?></h2>
    3838                            <?php the_author_meta( 'description' ); ?>
    3939                        </div><!-- #author-description  -->
    40                     </div><!-- .entry-author-info -->
     40                    </div><!-- #entry-author-info -->
    4141<?php endif; ?>
    4242
  • trunk/wp-content/themes/twentyten/comments.php

    r14708 r14786  
    1717<?php if ( post_password_required() ) : ?>
    1818                <div class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyten' ); ?></div>
    19             </div><!-- .comments -->
     19            </div><!-- #comments -->
    2020<?php
    2121        /* Stop the rest of comments.php from being processed,
     
    4141                <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyten' ) ); ?></div>
    4242                <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyten' ) ); ?></div>
    43             </div>
     43            </div> <!-- .navigation -->
    4444<?php endif; // check for comment navigation ?>
    4545
     
    6060                <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentyten' ) ); ?></div>
    6161                <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentyten' ) ); ?></div>
    62             </div>
     62            </div><!-- .navigation -->
    6363<?php endif; // check for comment navigation ?>
    6464
     
    7171?>
    7272    <p class="nocomments"><?php _e( 'Comments are closed.', 'twentyten' ); ?></p>
    73 <?php endif; // end ! comments_opened() ?>
     73<?php endif; // end ! comments_open() ?>
    7474
    7575<?php endif; // end have_comments() ?>
  • trunk/wp-content/themes/twentyten/editor-style-rtl.css

    r14466 r14786  
     1/*
     2Theme Name: Twenty Ten
     3*/
     4/*
     5Used to style the TinyMCE editor.
     6*/
    17html .mceContentBody{
    28    direction:rtl;
  • trunk/wp-content/themes/twentyten/editor-style.css

    r13178 r14786  
     1/*
     2Theme Name: Twenty Ten
     3*/
     4/*
     5Used to style the TinyMCE editor.
     6*/
    17html .mceContentBody {
    28    max-width:640px;
  • trunk/wp-content/themes/twentyten/footer.php

    r14708 r14786  
    2727                    <?php bloginfo( 'name' ); ?>
    2828                </a>
    29             </div>
     29            </div><!-- #site-info -->
    3030
    3131            <div id="site-generator">
     
    3535                    <?php printf( __('Proudly powered by %s.', 'twentyten'), 'WordPress' ); ?>
    3636                </a>
    37             </div>
     37            </div><!-- #site-generator -->
    3838
    3939        </div><!-- #colophon -->
     
    4242</div><!-- #wrapper -->
    4343
    44 <?php wp_footer(); ?>
     44<?php
     45    /* Always have wp_footer() just before the closing </body>
     46     * tag of your theme, or you will break many plugins, which
     47     * generally use this hook to reference JavaScript files.
     48     */
    4549
     50    wp_footer();
     51?>
    4652</body>
    4753</html>
  • trunk/wp-content/themes/twentyten/functions.php

    r14709 r14786  
    3232 * </code>
    3333 *
    34  * For more information on hooks, see http://codex.wordpress.org/Plugin_API.
     34 * For more information on hooks, actions, and filters, see http://codex.wordpress.org/Plugin_API.
    3535 *
    3636 * @package WordPress
     
    111111
    112112    // We'll be using post thumbnails for custom header images on posts and pages.
    113     // We want them to be 940 pixels wide by 198 pixels tall (larger images will be auto-cropped to fit).
     113    // We want them to be 940 pixels wide by 198 pixels tall.
     114    // Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php.
    114115    set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true );
    115116
     
    134135            'url' => '%s/images/headers/cherryblossoms.jpg',
    135136            'thumbnail_url' => '%s/images/headers/cherryblossoms-thumbnail.jpg',
    136             /* translators: header image description */         
     137            /* translators: header image description */
    137138            'description' => __( 'Cherry Blossoms', 'twentyten' )
    138139        ),
     
    140141            'url' => '%s/images/headers/concave.jpg',
    141142            'thumbnail_url' => '%s/images/headers/concave-thumbnail.jpg',
    142             /* translators: header image description */         
     143            /* translators: header image description */
    143144            'description' => __( 'Concave', 'twentyten' )
    144145        ),
     
    146147            'url' => '%s/images/headers/fern.jpg',
    147148            'thumbnail_url' => '%s/images/headers/fern-thumbnail.jpg',
    148             /* translators: header image description */         
     149            /* translators: header image description */
    149150            'description' => __( 'Fern', 'twentyten' )
    150151        ),
     
    152153            'url' => '%s/images/headers/forestfloor.jpg',
    153154            'thumbnail_url' => '%s/images/headers/forestfloor-thumbnail.jpg',
    154             /* translators: header image description */         
     155            /* translators: header image description */
    155156            'description' => __( 'Forest Floor', 'twentyten' )
    156157        ),
     
    158159            'url' => '%s/images/headers/inkwell.jpg',
    159160            'thumbnail_url' => '%s/images/headers/inkwell-thumbnail.jpg',
    160             /* translators: header image description */         
     161            /* translators: header image description */
    161162            'description' => __( 'Inkwell', 'twentyten' )
    162163        ),
     
    164165            'url' => '%s/images/headers/path.jpg',
    165166            'thumbnail_url' => '%s/images/headers/path-thumbnail.jpg',
    166             /* translators: header image description */         
     167            /* translators: header image description */
    167168            'description' => __( 'Path', 'twentyten' )
    168169        ),
     
    170171            'url' => '%s/images/headers/sunset.jpg',
    171172            'thumbnail_url' => '%s/images/headers/sunset-thumbnail.jpg',
    172             /* translators: header image description */         
     173            /* translators: header image description */
    173174            'description' => __( 'Sunset', 'twentyten' )
    174175        )
     
    289290            <?php echo get_avatar( $comment, 40 ); ?>
    290291            <?php printf( __( '%s <span class="says">says:</span>', 'twentyten' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?>
    291         </div>
     292        </div><!-- .comment-author .vcard -->
    292293        <?php if ( $comment->comment_approved == '0' ) : ?>
    293294            <em><?php _e( 'Your comment is awaiting moderation.', 'twentyten' ); ?></em>
     
    300301                printf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(),  get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' );
    301302            ?>
    302         </div>
     303        </div><!-- .comment-meta .commentmetadata -->
    303304
    304305        <div class="comment-body"><?php comment_text(); ?></div>
     
    306307        <div class="reply">
    307308            <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    308         </div>
    309     </div>
     309        </div><!-- .reply -->
     310    </div><!-- #comment-##  -->
    310311
    311312    <?php else : ?>
     
    326327 */
    327328function twentyten_widgets_init() {
    328     // Area 1
     329    // Area 1, located at the top of the sidebar.
    329330    register_sidebar( array(
    330331        'name' => __( 'Primary Widget Area', 'twentyten' ),
     
    337338    ) );
    338339
    339     // Area 2
     340    // Area 2, located below the Primary Widget Area in the sidebar. Empty by default.
    340341    register_sidebar( array(
    341342        'name' => __( 'Secondary Widget Area', 'twentyten' ),
     
    348349    ) );
    349350
    350     // Area 3
     351    // Area 3, located in the footer. Empty by default.
    351352    register_sidebar( array(
    352353        'name' => __( 'First Footer Widget Area', 'twentyten' ),
     
    359360    ) );
    360361
    361     // Area 4
     362    // Area 4, located in the footer. Empty by default.
    362363    register_sidebar( array(
    363364        'name' => __( 'Second Footer Widget Area', 'twentyten' ),
     
    370371    ) );
    371372
    372     // Area 5
     373    // Area 5, located in the footer. Empty by default.
    373374    register_sidebar( array(
    374375        'name' => __( 'Third Footer Widget Area', 'twentyten' ),
     
    381382    ) );
    382383
    383     // Area 6
     384    // Area 6, located in the footer. Empty by default.
    384385    register_sidebar( array(
    385386        'name' => __( 'Fourth Footer Widget Area', 'twentyten' ),
     
    423424            get_the_date()
    424425        ),
    425         sprintf( '</span> <span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>', 
     426        sprintf( '</span> <span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
    426427            get_author_posts_url( get_the_author_meta( 'ID' ) ),
    427428            sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),
     
    429430        )
    430431    );
    431    
    432432}
    433433endif;
     
    454454        get_permalink(),
    455455        the_title_attribute( 'echo=0' )
    456     ); 
    457 }
    458 endif;
     456    );
     457}
     458endif;
  • trunk/wp-content/themes/twentyten/header.php

    r14708 r14786  
    1414    <meta charset="<?php bloginfo( 'charset' ); ?>" />
    1515    <title>
    16     <?php
    17         if ( is_single() ) {
     16    <?php // Returns the title based on what is being viewed
     17        if ( is_single() ) { // single posts
    1818            single_post_title(); echo ' | '; bloginfo( 'name' );
     19        // The home page or, if using a static front page, the blog posts page.
    1920        } elseif ( is_home() || is_front_page() ) {
    20             bloginfo( 'name' ); 
    21             if( get_bloginfo( 'description' ) ) 
    22                 echo ' | ' ; bloginfo( 'description' ); 
     21            bloginfo( 'name' );
     22            if( get_bloginfo( 'description' ) )
     23                echo ' | ' ; bloginfo( 'description' );
    2324            twentyten_the_page_number();
    24         } elseif ( is_page() ) {
     25        } elseif ( is_page() ) { // WordPress Pages
    2526            single_post_title( '' ); echo ' | '; bloginfo( 'name' );
    26         } elseif ( is_search() ) {
     27        } elseif ( is_search() ) { // Search results
    2728            printf( __( 'Search results for %s', 'twentyten' ), '"'.get_search_query().'"' ); twentyten_the_page_number(); echo ' | '; bloginfo( 'name' );
    28         } elseif ( is_404() ) {
     29        } elseif ( is_404() ) {  // 404 (Not Found)
    2930            _e( 'Not Found', 'twentyten' ); echo ' | '; bloginfo( 'name' );
    30         } else {
     31        } else { // Otherwise:
    3132            wp_title( '' ); echo ' | '; bloginfo( 'name' ); twentyten_the_page_number();
    3233        }
     
    3536    <link rel="profile" href="http://gmpg.org/xfn/11" />
    3637    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
    37     <?php if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); ?>
    3838    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    39     <?php wp_head(); ?>
     39<?php
     40    /* We add some JavaScript to pages with the comment form
     41     * to support sites with threaded comments (when in use).
     42     */
     43    if ( is_singular() && get_option( 'thread_comments' ) )
     44        wp_enqueue_script( 'comment-reply' );
     45
     46    /* Always have wp_head() just before the closing </head>
     47     * tag of your theme, or you will break many plugins, which
     48     * generally use this hook to add elements to <head> such
     49     * as styles, scripts, and meta tags.
     50     */
     51
     52    wp_head();
     53?>
    4054</head>
    4155
     
    6781
    6882            <div id="access" role="navigation">
     83              <?php /*  Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?>
    6984                <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>
     85                <?php /* Our navigation menu.  If one isn't filled out, wp_nav_menu falls back to wp_page_menu.  The menu assiged to the primary position is the one used.  If none is assigned, the menu with the lowest ID is used.  */ ?>
    7086                <?php wp_nav_menu( array( 'sort_column' => 'menu_order', 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
    7187            </div><!-- #access -->
  • trunk/wp-content/themes/twentyten/loop.php

    r14708 r14786  
    77 * http://codex.wordpress.org/Template_Tags to understand
    88 * the tags used in it.
     9 *
     10 * This can be overridden in child themes with loop.php or
     11 * loop-template.php, where 'template' is the loop context
     12 * requested by a template. For example, loop-index.php would
     13 * be used if it exists and we ask for the loop with:
     14 * <code>get_template_part( 'loop', 'index' );</code>
    915 *
    1016 * @package WordPress
     
    6975?>
    7076                    <a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a>
    71                 </div>
     77                </div><!-- .gallery-thumb -->
    7278                <p><em><?php printf( __( 'This gallery contains <a %1$s>%2$s photos</a>.', 'twentyten' ),
    7379                        'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"',
     
    8389                <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
    8490                <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
    85             </div><!-- #entry-utility -->
    86         </div>
     91            </div><!-- .entry-utility -->
     92        </div><!-- #post-## -->
    8793
    8894<?php /* How to display posts in the asides category */ ?>
     
    106112                <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
    107113                <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
    108             </div><!-- #entry-utility -->
    109         </div><!-- #post-(id) -->
     114            </div><!-- .entry-utility -->
     115        </div><!-- #post-## -->
    110116
    111117<?php /* How to display all other posts. */ ?>
     
    148154                <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
    149155                <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
    150             </div><!-- #entry-utility -->
     156            </div><!-- .entry-utility -->
    151157        </div><!-- #post-<?php the_ID(); ?> -->
    152158
  • trunk/wp-content/themes/twentyten/search.php

    r14708 r14786  
    3030                        <?php get_search_form(); ?>
    3131                    </div><!-- .entry-content -->
    32                 </div>
     32                </div><!-- #post-0 -->
    3333<?php endif; ?>
    3434            </div><!-- #content -->
  • trunk/wp-content/themes/twentyten/single.php

    r14708 r14786  
    4747                            </div><!-- #author-link -->
    4848                        </div><!-- #author-description -->
    49                     </div><!-- .entry-author-info -->
     49                    </div><!-- #entry-author-info -->
    5050<?php endif; ?>
    5151
     
    5454                        <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
    5555                    </div><!-- .entry-utility -->
    56                 </div><!-- #post-(id) -->
     56                </div><!-- #post-## -->
    5757
    5858                <div id="nav-below" class="navigation">
Note: See TracChangeset for help on using the changeset viewer.