WordPress.org

Make WordPress Core

Changeset 13112


Ignore:
Timestamp:
02/13/10 13:35:03 (5 years ago)
Author:
dd32
Message:

Whitespace cleanup, TwentyTen <title> standardisation & gettext. See #9015

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

Legend:

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

    r13041 r13112  
    4747    require_once($locale_file); 
    4848 
    49  
    50  
    5149// Get the page number 
    5250function get_page_number() { 
    5351    if ( get_query_var('paged') ) 
    54         print ' | ' . __( 'Page ' , 'twentyten') . get_query_var('paged'); 
    55 } // end get_page_number 
    56  
    57  
     52        echo ' | ' . __( 'Page ' , 'twentyten') . get_query_var('paged'); 
     53} 
    5854 
    5955// Control excerpt length 
     
    6460 
    6561 
    66  
    6762// Make a nice read more link on excerpts 
    6863function new_excerpt_more($more) { 
     
    7065} 
    7166add_filter('excerpt_more', 'new_excerpt_more'); 
    72  
    7367 
    7468 
     
    8074        <div id="comment-<?php comment_ID(); ?>"> 
    8175        <div class="comment-author vcard"> 
    82             <?php echo get_avatar($comment,$size='40'); ?> 
     76            <?php echo get_avatar($comment, 40); ?> 
    8377 
    8478            <?php printf(__('<cite class="fn">%s</cite> <span class="says">says:</span>'), get_comment_author_link()) ?> 
     
    8983        <?php endif; ?> 
    9084 
    91         <div class="comment-meta commentmetadata"><a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php printf(__('%1$s at %2$s'), get_comment_date(),  get_comment_time()) ?></a><?php edit_comment_link(__('(Edit)'),'  ','') ?></div> 
     85        <div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ) ?>"><?php printf(__('%1$s at %2$s'), get_comment_date(),  get_comment_time()) ?></a><?php edit_comment_link(__('(Edit)'),'  ','') ?></div> 
    9286 
    9387        <div class="comment-body"><?php comment_text() ?></div> 
     
    10498} 
    10599 
    106  
    107  
    108100// Make the Visual Editor styles match the theme's styles 
    109     add_filter('mce_css', 'my_editor_style'); 
    110     function my_editor_style($url) { 
    111  
    112         if ( !empty($url) ) 
    113             $url .= ','; 
     101function my_editor_style($url) { 
     102    if ( !empty($url) ) 
     103        $url .= ','; 
    114104 
    115105    // Change the path here if using sub-directory 
     
    118108    return $url; 
    119109} 
    120  
    121  
     110add_filter('mce_css', 'my_editor_style'); 
    122111 
    123112// Remove inline styles on gallery shortcode 
    124  
    125113function remove_gallery_css() { 
    126114    return "<div class='gallery'>"; 
    127115} 
    128116add_filter('gallery_style', 'remove_gallery_css'); 
    129  
    130  
    131117 
    132118// For category lists on category archives: Returns other categories except the current one (redundant) 
     
    147133} // end cats_meow 
    148134 
    149  
    150  
    151135// For tag lists on tag archives: Returns other tags except the current one (redundant) 
    152136function tag_ur_it($glue) { 
     
    166150} // end tag_ur_it 
    167151 
    168  
    169152// Register widgetized areas 
    170153function theme_widgets_init() { 
     
    237220} // end theme_widgets_init 
    238221 
    239  
    240  
    241222// Add all the groovy widget areas 
    242223add_action( 'init', 'theme_widgets_init' ); 
  • trunk/wp-content/themes/twentyten/header.php

    r13105 r13112  
    33<head> 
    44    <title><?php 
    5         if ( is_single() ) { single_post_title(); print ' | '; bloginfo('name'); } 
    6         elseif ( is_home() || is_front_page() ) { bloginfo('name'); print ' | '; bloginfo('description'); get_page_number(); } 
    7         elseif ( is_page() ) { single_post_title(''); print ' | '; bloginfo('name'); } 
    8         elseif ( is_search() ) { print 'Search results for ' . esc_html($s); get_page_number(); print ' | '; bloginfo('name'); } 
    9         elseif ( is_404() ) { print 'Not Found | '; bloginfo('name'); } 
    10         else { bloginfo('name'); wp_title('|'); get_page_number(); } 
     5        if ( is_single() ) { 
     6            single_post_title(); echo ' | '; bloginfo('name'); 
     7        } elseif ( is_home() || is_front_page() ) { 
     8            bloginfo('name'); echo ' | '; bloginfo('description'); get_page_number(); 
     9        } elseif ( is_page() ) { 
     10            single_post_title(''); echo ' | '; bloginfo('name'); 
     11        } elseif ( is_search() ) { 
     12            printf(__('Search results for "%s"', 'twentyten'), esc_html($s)); get_page_number(); echo ' | '; bloginfo('name');  
     13        } elseif ( is_404() ) { 
     14            _e('Not Found', 'twentyten'); echo ' | '; bloginfo('name'); 
     15        } else { 
     16            wp_title(''); echo ' | '; bloginfo('name'); get_page_number(); 
     17        } 
    1118    ?></title> 
    1219 
Note: See TracChangeset for help on using the changeset viewer.