Changeset 14433
- Timestamp:
- 05/04/2010 07:01:09 AM (15 years ago)
- Location:
- trunk/wp-content/themes/twentyten
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentyten/attachment.php
r14384 r14433 97 97 <?php _e( 'Both comments and trackbacks are currently closed.', 'twentyten' ); ?> 98 98 <?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>' ); ?> 100 100 </div><!-- .entry-utility --> 101 101 </div><!-- #post-<?php the_ID(); ?> --> -
trunk/wp-content/themes/twentyten/comments.php
r14358 r14433 30 30 <h3 id="comments-title"> 31 31 <?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' ), 33 33 number_format_i18n( get_comments_number() ), '<em>' . get_the_title() . '</em>' ); 34 34 ?> -
trunk/wp-content/themes/twentyten/footer.php
r13885 r14433 24 24 25 25 <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> 27 28 </div> 28 29 -
trunk/wp-content/themes/twentyten/functions.php
r14384 r14433 105 105 // The height and width of your custom header. You can hook into the theme's own filters to change these values. 106 106 // 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', 108 define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyten_header_image_height', 107 define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyten_header_image_width', 940 ) ); 108 define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyten_header_image_height', 198 ) ); 109 109 110 110 // We'll be using post thumbnails for custom header images on posts and pages. … … 228 228 */ 229 229 function twentyten_excerpt_more( $more ) { 230 return ' … <a href="'. get_permalink() . '">' . __('Continue reading <span class="meta-nav">→</span>', 'twentyten') . '</a>';230 return ' … <a href="'. get_permalink() . '">' . __('Continue reading <span class="meta-nav">→</span>', 'twentyten') . '</a>'; 231 231 } 232 232 add_filter( 'excerpt_more', 'twentyten_excerpt_more' ); … … 269 269 <?php endif; ?> 270 270 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> 272 272 273 273 <div class="comment-body"><?php comment_text(); ?></div> … … 280 280 <?php else : ?> 281 281 <li class="post pingback"> 282 <p><?php _e( 'Pingback: ', 'twentyten' ); ?><?php comment_author_link(); ?><?php edit_comment_link ( __('edit', 'twentyten'), ' ', '' ); ?></p>282 <p><?php _e( 'Pingback:', 'twentyten' ); ?> <?php comment_author_link(); ?><?php edit_comment_link ( __('(Edit)', 'twentyten'), ' ' ); ?></p> 283 283 <?php endif; 284 284 } … … 295 295 // Area 1 296 296 register_sidebar( array ( 297 'name' => __( 'Primary Widget Area' 297 'name' => __( 'Primary Widget Area', 'twentyten' ), 298 298 'id' => 'primary-widget-area', 299 'description' => __( 'The primary widget area' 299 'description' => __( 'The primary widget area', 'twentyten' ), 300 300 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 301 301 'after_widget' => "</li>", … … 306 306 // Area 2 307 307 register_sidebar( array ( 308 'name' => __( 'Secondary Widget Area' 308 'name' => __( 'Secondary Widget Area', 'twentyten' ), 309 309 'id' => 'secondary-widget-area', 310 'description' => __( 'The secondary widget area' 310 'description' => __( 'The secondary widget area', 'twentyten' ), 311 311 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 312 312 'after_widget' => "</li>", … … 317 317 // Area 3 318 318 register_sidebar( array ( 319 'name' => __( 'First Footer Widget Area' 319 'name' => __( 'First Footer Widget Area', 'twentyten' ), 320 320 'id' => 'first-footer-widget-area', 321 'description' => __( 'The first footer widget area' 321 'description' => __( 'The first footer widget area', 'twentyten' ), 322 322 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 323 323 'after_widget' => "</li>", … … 328 328 // Area 4 329 329 register_sidebar( array ( 330 'name' => __( 'Second Footer Widget Area' 330 'name' => __( 'Second Footer Widget Area', 'twentyten' ), 331 331 'id' => 'second-footer-widget-area', 332 'description' => __( 'The second footer widget area' 332 'description' => __( 'The second footer widget area', 'twentyten' ), 333 333 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 334 334 'after_widget' => "</li>", … … 339 339 // Area 5 340 340 register_sidebar( array ( 341 'name' => __( 'Third Footer Widget Area' 341 'name' => __( 'Third Footer Widget Area', 'twentyten' ), 342 342 'id' => 'third-footer-widget-area', 343 'description' => __( 'The third footer widget area' 343 'description' => __( 'The third footer widget area', 'twentyten' ), 344 344 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 345 345 'after_widget' => "</li>", … … 350 350 // Area 6 351 351 register_sidebar( array ( 352 'name' => __( 'Fourth Footer Widget Area' 352 'name' => __( 'Fourth Footer Widget Area', 'twentyten' ), 353 353 'id' => 'fourth-footer-widget-area', 354 'description' => __( 'The fourth footer widget area' 354 'description' => __( 'The fourth footer widget area', 'twentyten' ), 355 355 'before_widget' => '<li id="%1$s" class="widget-container %2$s">', 356 356 'after_widget' => "</li>", … … 376 376 global $post; 377 377 $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' ) ) ); 379 379 380 foreach ( $attachments as $k => $attachment ) 380 foreach ( $attachments as $k => $attachment ) { 381 381 if ( $attachment->ID == $post->ID ) 382 382 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 56 56 <?php 57 57 // Check if this is a post or page, if it has a thumbnail, and if it's a big one 58 if ( 58 if ( is_singular() && 59 59 has_post_thumbnail( $post->ID ) && 60 60 ( /* $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 1 1 <?php 2 3 2 /** 4 3 * The main template file … … 14 13 * @since 3.0.0 15 14 */ 16 17 15 ?> 18 16 -
trunk/wp-content/themes/twentyten/loop.php
r14391 r14433 14 14 ?> 15 15 16 <?php /* Display navigation to next/previous pages when applicable 16 <?php /* Display navigation to next/previous pages when applicable */ ?> 17 17 <?php if ( $wp_query->max_num_pages > 1 ) : ?> 18 18 <div id="nav-above" class="navigation"> … … 22 22 <?php endif; ?> 23 23 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 */ ?> 25 25 <?php if ( ! have_posts() ) : ?> 26 26 <div id="post-0" class="post error404 not-found"> … … 33 33 <?php endif; ?> 34 34 35 <?php /* Start the Loop 35 <?php /* Start the Loop */ ?> 36 36 <?php while ( have_posts() ) : the_post(); ?> 37 37 38 <?php /* How to Display posts in the Gallery Category 38 <?php /* How to Display posts in the Gallery Category */ ?> 39 39 <?php if ( in_category( _x('gallery', 'gallery category slug', 'twentyten') ) ) : ?> 40 40 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> … … 92 92 <?php else : ?> 93 93 <div class="entry-content"> 94 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>94 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> 95 95 </div><!-- .entry-content --> 96 96 <?php endif; ?> … … 113 113 </div><!-- #post-<?php the_ID(); ?> --> 114 114 115 <?php /* How to display all other posts 115 <?php /* How to display all other posts */ ?> 116 116 <?php else : ?> 117 117 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> … … 137 137 <?php else : ?> 138 138 <div class="entry-content"> 139 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>139 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> 140 140 <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?> 141 141 </div><!-- .entry-content --> … … 156 156 <?php endwhile; ?> 157 157 158 <?php /* Display navigation to next/previous pages when applicable 158 <?php /* Display navigation to next/previous pages when applicable */ ?> 159 159 <?php if ( $wp_query->max_num_pages > 1 ) : ?> 160 160 <div id="nav-below" class="navigation"> -
trunk/wp-content/themes/twentyten/single.php
r14389 r14433 27 27 <span class="meta-prep meta-prep-author"><?php _e( 'Posted on ', 'twentyten' ); ?></span> 28 28 <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' ); ?> 29 <span class="meta-sep"><?php _e( ' by ', 'twentyten' ); ?></span> 30 30 <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> 31 31 </div><!-- .entry-meta --> … … 40 40 <div id="author-avatar"> 41 41 <?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 --> 43 43 <div id="author-description"> 44 44 <h2><?php _e( 'About ', 'twentyten' ); ?><?php the_author(); ?></h2> … … 47 47 <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(); ?> →</a> 48 48 </div><!-- #author-link --> 49 </div><!-- #author-description 49 </div><!-- #author-description --> 50 50 </div><!-- .entry-author-info --> 51 51 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.