Make WordPress Core

Changeset 14433


Ignore:
Timestamp:
05/04/2010 07:01:09 AM (15 years ago)
Author:
nacin
Message:

Twenty Ten spacing and string cleanups. props zeo, markmcwilliams. see #13198. Add a twentyten_credits filter, props nathanrice, fixes #12804. Also clean up the generator/credits string.

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

Legend:

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

    r14384 r14433  
    9797                        <?php _e( 'Both comments and trackbacks are currently closed.', 'twentyten' ); ?>
    9898<?php endif; ?>
    99 <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
     99<?php edit_post_link( __( 'Edit', 'twentyten' ), ' <span class="edit-link">', '</span>' ); ?>
    100100                    </div><!-- .entry-utility -->
    101101                </div><!-- #post-<?php the_ID(); ?> -->
  • trunk/wp-content/themes/twentyten/comments.php

    r14358 r14433  
    3030            <h3 id="comments-title">
    3131<?php
    32     printf( _n('One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'twentyten'),
     32    printf( _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'twentyten' ),
    3333        number_format_i18n( get_comments_number() ), '<em>' . get_the_title() . '</em>' );
    3434?>
  • trunk/wp-content/themes/twentyten/footer.php

    r13885 r14433  
    2424
    2525            <div id="site-generator">
    26                 <?php printf( __( 'Proudly powered by <span id="generator-link">%s</span>.', 'twentyten' ), '<a href="http://wordpress.org/" title="' . esc_attr__( 'Semantic Personal Publishing Platform', 'twentyten' ) . '" rel="generator">' . __( 'WordPress', 'twentyten' ) . '</a>' ); ?>
     26                <?php do_action('twentyten_credits' ); ?>
     27                <a href="http://wordpress.org/" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyten' ); ?>" rel="generator"><?php printf( __( 'Proudly powered by %s.', 'twentyten' ), 'WordPress' ); ?></a>
    2728            </div>
    2829
  • trunk/wp-content/themes/twentyten/functions.php

    r14384 r14433  
    105105    // The height and width of your custom header. You can hook into the theme's own filters to change these values.
    106106    // Add a filter to twentyten_header_image_width and twentyten_header_image_height to change these values.
    107     define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyten_header_image_width',  940 ) );
    108     define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyten_header_image_height',  198 ) );
     107    define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyten_header_image_width', 940 ) );
     108    define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyten_header_image_height', 198 ) );
    109109
    110110    // We'll be using post thumbnails for custom header images on posts and pages.
     
    228228 */
    229229function twentyten_excerpt_more( $more ) {
    230     return '&nbsp;&hellip; <a href="'. get_permalink() . '">' . __('Continue&nbsp;reading&nbsp;<span class="meta-nav">&rarr;</span>', 'twentyten') . '</a>';
     230    return ' &hellip; <a href="'. get_permalink() . '">' . __('Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten') . '</a>';
    231231}
    232232add_filter( 'excerpt_more', 'twentyten_excerpt_more' );
     
    269269        <?php endif; ?>
    270270
    271         <div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"><?php printf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(),  get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'twentyten' ),'  ','' ); ?></div>
     271        <div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"><?php printf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(),  get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' ); ?></div>
    272272
    273273        <div class="comment-body"><?php comment_text(); ?></div>
     
    280280    <?php else : ?>
    281281    <li class="post pingback">
    282         <p><?php _e( 'Pingback: ', 'twentyten' ); ?><?php comment_author_link(); ?><?php edit_comment_link ( __('edit', 'twentyten'), '&nbsp;&nbsp;', '' ); ?></p>
     282        <p><?php _e( 'Pingback:', 'twentyten' ); ?> <?php comment_author_link(); ?><?php edit_comment_link ( __('(Edit)', 'twentyten'), ' ' ); ?></p>
    283283    <?php endif;
    284284}
     
    295295    // Area 1
    296296    register_sidebar( array (
    297         'name' => __( 'Primary Widget Area' , 'twentyten' ),
     297        'name' => __( 'Primary Widget Area', 'twentyten' ),
    298298        'id' => 'primary-widget-area',
    299         'description' => __( 'The primary widget area' , 'twentyten' ),
     299        'description' => __( 'The primary widget area', 'twentyten' ),
    300300        'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
    301301        'after_widget' => "</li>",
     
    306306    // Area 2
    307307    register_sidebar( array (
    308         'name' => __( 'Secondary Widget Area' , 'twentyten' ),
     308        'name' => __( 'Secondary Widget Area', 'twentyten' ),
    309309        'id' => 'secondary-widget-area',
    310         'description' => __( 'The secondary widget area' , 'twentyten' ),
     310        'description' => __( 'The secondary widget area', 'twentyten' ),
    311311        'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
    312312        'after_widget' => "</li>",
     
    317317    // Area 3
    318318    register_sidebar( array (
    319         'name' => __( 'First Footer Widget Area' , 'twentyten' ),
     319        'name' => __( 'First Footer Widget Area', 'twentyten' ),
    320320        'id' => 'first-footer-widget-area',
    321         'description' => __( 'The first footer widget area' , 'twentyten' ),
     321        'description' => __( 'The first footer widget area', 'twentyten' ),
    322322        'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
    323323        'after_widget' => "</li>",
     
    328328    // Area 4
    329329    register_sidebar( array (
    330         'name' => __( 'Second Footer Widget Area' , 'twentyten' ),
     330        'name' => __( 'Second Footer Widget Area', 'twentyten' ),
    331331        'id' => 'second-footer-widget-area',
    332         'description' => __( 'The second footer widget area' , 'twentyten' ),
     332        'description' => __( 'The second footer widget area', 'twentyten' ),
    333333        'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
    334334        'after_widget' => "</li>",
     
    339339    // Area 5
    340340    register_sidebar( array (
    341         'name' => __( 'Third Footer Widget Area' , 'twentyten' ),
     341        'name' => __( 'Third Footer Widget Area', 'twentyten' ),
    342342        'id' => 'third-footer-widget-area',
    343         'description' => __( 'The third footer widget area' , 'twentyten' ),
     343        'description' => __( 'The third footer widget area', 'twentyten' ),
    344344        'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
    345345        'after_widget' => "</li>",
     
    350350    // Area 6
    351351    register_sidebar( array (
    352         'name' => __( 'Fourth Footer Widget Area' , 'twentyten' ),
     352        'name' => __( 'Fourth Footer Widget Area', 'twentyten' ),
    353353        'id' => 'fourth-footer-widget-area',
    354         'description' => __( 'The fourth footer widget area' , 'twentyten' ),
     354        'description' => __( 'The fourth footer widget area', 'twentyten' ),
    355355        'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
    356356        'after_widget' => "</li>",
     
    376376    global $post;
    377377    $post = get_post($post);
    378     $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') ));
     378    $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' ) ) );
    379379 
    380     foreach ( $attachments as $k => $attachment )
     380    foreach ( $attachments as $k => $attachment ) {
    381381        if ( $attachment->ID == $post->ID )
    382382            break;
    383 
    384         $k = $k + 1;
    385  
    386         if ( isset($attachments[$k]) ) {
    387             return get_attachment_link($attachments[$k]->ID);       
    388         } else {
    389             return get_permalink($post->post_parent);
    390         }
    391 }
     383    }
     384    $k++;
     385    if ( isset( $attachments[ $k ] ) )
     386        return get_attachment_link( $attachments[ $k ]->ID );
     387    else
     388        return get_permalink( $post->post_parent );
     389}
  • trunk/wp-content/themes/twentyten/header.php

    r14388 r14433  
    5656                <?php
    5757                    // Check if this is a post or page, if it has a thumbnail, and if it's a big one
    58                     if (    is_singular() &&
     58                    if ( is_singular() &&
    5959                            has_post_thumbnail( $post->ID ) &&
    6060                            ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail') ) &&
  • trunk/wp-content/themes/twentyten/index.php

    r13885 r14433  
    11<?php
    2 
    32/**
    43 * The main template file
     
    1413 * @since 3.0.0
    1514 */
    16  
    1715?>
    1816 
  • trunk/wp-content/themes/twentyten/loop.php

    r14391 r14433  
    1414?>
    1515
    16 <?php /* Display navigation to next/previous pages when applicable  */ ?>
     16<?php /* Display navigation to next/previous pages when applicable */ ?>
    1717<?php if ( $wp_query->max_num_pages > 1 ) : ?>
    1818    <div id="nav-above" class="navigation">
     
    2222<?php endif; ?>
    2323
    24 <?php /* If there are no posts to display, such as an empty archive page  */ ?>
     24<?php /* If there are no posts to display, such as an empty archive page */ ?>
    2525<?php if ( ! have_posts() ) : ?>
    2626    <div id="post-0" class="post error404 not-found">
     
    3333<?php endif; ?>
    3434
    35 <?php /* Start the Loop  */ ?>
     35<?php /* Start the Loop */ ?>
    3636<?php while ( have_posts() ) : the_post(); ?>
    3737
    38 <?php /* How to Display posts in the Gallery Category  */ ?>
     38<?php /* How to Display posts in the Gallery Category */ ?>
    3939    <?php if ( in_category( _x('gallery', 'gallery category slug', 'twentyten') ) ) : ?>
    4040        <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
     
    9292    <?php else : ?>
    9393            <div class="entry-content">
    94                 <?php the_content( __( 'Continue&nbsp;reading&nbsp;<span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
     94                <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
    9595            </div><!-- .entry-content -->
    9696    <?php endif; ?>
     
    113113        </div><!-- #post-<?php the_ID(); ?> -->
    114114
    115 <?php /* How to display all other posts  */ ?>
     115<?php /* How to display all other posts */ ?>
    116116    <?php else : ?>
    117117        <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
     
    137137    <?php else : ?>
    138138            <div class="entry-content">
    139                 <?php the_content( __( 'Continue&nbsp;reading&nbsp;<span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
     139                <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
    140140                <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
    141141            </div><!-- .entry-content -->
     
    156156<?php endwhile; ?>
    157157
    158 <?php /* Display navigation to next/previous pages when applicable  */ ?>
     158<?php /* Display navigation to next/previous pages when applicable */ ?>
    159159<?php if (  $wp_query->max_num_pages > 1 ) : ?>
    160160                <div id="nav-below" class="navigation">
  • trunk/wp-content/themes/twentyten/single.php

    r14389 r14433  
    2727                        <span class="meta-prep meta-prep-author"><?php _e( 'Posted on ', 'twentyten' ); ?></span>
    2828                        <a href="<?php the_permalink(); ?>" title="<?php the_time(); ?>" rel="bookmark"><span class="entry-date"><?php echo get_the_date(); ?></span></a>
    29                         <span class="meta-sep"><?php _e( ' by ', 'twentyten' ); ?> </span>
     29                        <span class="meta-sep"><?php _e( ' by ', 'twentyten' ); ?></span>
    3030                        <span class="author vcard"><a class="url fn n" href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ); ?>"><?php the_author(); ?></a></span>
    3131                    </div><!-- .entry-meta -->
     
    4040                        <div id="author-avatar">
    4141                            <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?>
    42                         </div><!-- #author-avatar   -->
     42                        </div><!-- #author-avatar -->
    4343                        <div id="author-description">
    4444                            <h2><?php _e( 'About ', 'twentyten' ); ?><?php the_author(); ?></h2>
     
    4747                                <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ); ?>"><?php _e( 'View all posts by ', 'twentyten' ); ?><?php the_author(); ?> &rarr;</a>
    4848                            </div><!-- #author-link -->
    49                         </div><!-- #author-description  -->
     49                        </div><!-- #author-description -->
    5050                    </div><!-- .entry-author-info -->
    5151<?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.