WordPress.org

Make WordPress Core

Changeset 17739


Ignore:
Timestamp:
04/28/11 10:13:38 (4 years ago)
Author:
nacin
Message:

More Twenty Eleven cleanup and add the comment-awaiting-moderation class. see #17198. see #15206 for history on the CSS class.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyeleven/functions.php

    r17738 r17739  
    7373function twentyeleven_setup() { 
    7474 
    75     /** 
    76      * Make theme available for translation 
    77      * Translations can be filed in the /languages/ directory 
     75    /* Make Twenty Eleven available for translation. 
     76     * Translations can be added to the /languages/ directory. 
    7877     * If you're building a theme based on Twenty Eleven, use a find and replace 
    79      * to change 'twentyeleven' to the name of your theme in all the template files 
     78     * to change 'twentyeleven' to the name of your theme in all the template files. 
    8079     */ 
    8180    load_theme_textdomain( 'twentyeleven', TEMPLATEPATH . '/languages' ); 
     
    8685        require_once( $locale_file ); 
    8786 
    88     /** 
    89      * Load up our theme options page 
    90      */ 
     87    // Load up our theme options page and related code. 
    9188    require( dirname( __FILE__ ) . '/inc/theme-options.php' ); 
    9289 
    93     /** 
    94      * Grab Twenty Eleven's Custom Widgets 
    95      */ 
     90    // Grab Twenty Eleven's Epherma widget. 
    9691    require( dirname( __FILE__ ) . '/inc/widgets.php' ); 
    9792 
    98     /** 
    99      * Add default posts and comments RSS feed links to head 
    100      */ 
     93    // Add default posts and comments RSS feed links to <head>. 
    10194    add_theme_support( 'automatic-feed-links' ); 
    10295 
    103     /** 
    104      * This theme uses wp_nav_menu() in one location. 
    105      */ 
    106     register_nav_menus( array( 
    107         'primary' => __( 'Primary Menu', 'twentyeleven' ), 
    108     ) ); 
     96    // This theme uses wp_nav_menu() in one location. 
     97    register_nav_menu( 'primary', __( 'Primary Menu', 'twentyeleven' ) ); 
    10998 
    11099    /** 
     
    477466        $count++; 
    478467 
     468    $class = ''; 
     469 
    479470    switch ( $count ) { 
    480471        case '1': 
    481472            $class = 'one'; 
    482473            break; 
    483  
    484474        case '2': 
    485475            $class = 'two'; 
    486476            break; 
    487  
    488477        case '3': 
    489478            $class = 'three'; 
    490479            break; 
    491  
    492         default: 
    493             $class = ''; 
    494             break; 
    495     } 
    496  
    497     if ( '' != $class ) 
     480    } 
     481 
     482    if ( $class ) 
    498483        echo 'class="' . $class . '"'; 
    499484} 
     
    546531 
    547532                <?php if ( $comment->comment_approved == '0' ) : ?> 
    548                     <em><?php _e( 'Your comment is awaiting moderation.', 'twentyeleven' ); ?></em> 
     533                    <em class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentyeleven' ); ?></em> 
    549534                    <br /> 
    550535                <?php endif; ?> 
Note: See TracChangeset for help on using the changeset viewer.