Make WordPress Core


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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 -->
Note: See TracChangeset for help on using the changeset viewer.