Changeset 25627
- Timestamp:
- 09/25/2013 05:03:34 PM (12 years ago)
- Location:
- trunk/src/wp-content/themes/twentyten
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyten/404.php
r15226 r25627 1 1 <?php 2 2 /** 3 * T he template for displaying 404 pages (Not Found).3 * Template for displaying 404 pages (Not Found) 4 4 * 5 5 * @package WordPress -
trunk/src/wp-content/themes/twentyten/archive.php
r19241 r25627 1 1 <?php 2 2 /** 3 * T he template for displaying Archive pages.3 * Template for displaying Archive pages 4 4 * 5 5 * Used to display archive-type pages if nothing more specific matches a query. 6 6 * For example, puts together date-based pages if no date.php file exists. 7 7 * 8 * Learn more:http://codex.wordpress.org/Template_Hierarchy8 * @link http://codex.wordpress.org/Template_Hierarchy 9 9 * 10 10 * @package WordPress … … 19 19 20 20 <?php 21 /* Queue the first post, that way we know 21 /** 22 * Queue the first post, that way we know 22 23 * what date we're dealing with (if that is the case). 23 24 * … … 42 43 43 44 <?php 44 /* Since we called the_post() above, we need to 45 /** 46 * Since we called the_post() above, we need to 45 47 * rewind the loop back to the beginning that way 46 48 * we can run the loop properly, in full. … … 48 50 rewind_posts(); 49 51 50 /* Run the loop for the archives page to output the posts. 52 /** 53 * Run the loop for the archives page to output the posts. 51 54 * If you want to overload this in a child theme then include a file 52 55 * called loop-archive.php and that will be used instead. -
trunk/src/wp-content/themes/twentyten/attachment.php
r17340 r25627 1 1 <?php 2 2 /** 3 * T he template for displaying attachments.3 * Template for displaying attachments 4 4 * 5 5 * @package WordPress … … 14 14 15 15 <?php 16 /* Run the loop to output the attachment. 16 /** 17 * Run the loop to output the attachment. 17 18 * If you want to overload this in a child theme then include a file 18 19 * called loop-attachment.php and that will be used instead. -
trunk/src/wp-content/themes/twentyten/author.php
r15226 r25627 1 1 <?php 2 2 /** 3 * T he template for displaying Author Archive pages.3 * Template for displaying Author Archive pages 4 4 * 5 5 * @package WordPress … … 14 14 15 15 <?php 16 /* Queue the first post, that way we know who 16 /** 17 * Queue the first post, that way we know who 17 18 * the author is when we try to get their name, 18 19 * URL, description, avatar, etc. … … 32 33 <div id="entry-author-info"> 33 34 <div id="author-avatar"> 34 <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?> 35 <?php 36 /** 37 * Filter the Twenty Ten author bio avatar size. 38 * 39 * @since Twenty Ten 1.0 40 * 41 * @param int The height and width avatar dimensions in pixels. Default 60. 42 */ 43 echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); 44 ?> 35 45 </div><!-- #author-avatar --> 36 46 <div id="author-description"> … … 42 52 43 53 <?php 44 /* Since we called the_post() above, we need to 54 /** 55 * Since we called the_post() above, we need to 45 56 * rewind the loop back to the beginning that way 46 57 * we can run the loop properly, in full. … … 48 59 rewind_posts(); 49 60 50 /* Run the loop for the author archive page to output the authors posts 61 /** 62 * Run the loop for the author archive page to output the authors posts 51 63 * If you want to overload this in a child theme then include a file 52 64 * called loop-author.php and that will be used instead. -
trunk/src/wp-content/themes/twentyten/category.php
r15226 r25627 1 1 <?php 2 2 /** 3 * T he template for displaying Category Archive pages.3 * Template for displaying Category Archive pages 4 4 * 5 5 * @package WordPress … … 21 21 echo '<div class="archive-meta">' . $category_description . '</div>'; 22 22 23 /* Run the loop for the category page to output the posts. 23 /** 24 * Run the loop for the category page to output the posts. 24 25 * If you want to overload this in a child theme then include a file 25 26 * called loop-category.php and that will be used instead. -
trunk/src/wp-content/themes/twentyten/comments.php
r22621 r25627 1 1 <?php 2 2 /** 3 * T he template for displaying Comments.3 * Template for displaying Comments 4 4 * 5 5 * The area of the page that contains both current comments … … 19 19 </div><!-- #comments --> 20 20 <?php 21 /* Stop the rest of comments.php from being processed, 21 /** 22 * Stop the rest of comments.php from being processed, 22 23 * but don't kill the script entirely -- we still have 23 24 * to fully load the template. … … 46 47 <ol class="commentlist"> 47 48 <?php 48 /* Loop through and list the comments. Tell wp_list_comments() 49 /** 50 * Loop through and list the comments. Tell wp_list_comments() 49 51 * to use twentyten_comment() to format the comments. 50 52 * If you want to overload this in a child theme then you can … … 64 66 65 67 <?php 66 /* If there are no comments and comments are closed, let's leave a little note, shall we? 68 /** 69 * If there are no comments and comments are closed, let's leave a little note, shall we? 67 70 * But we only want the note on posts and pages that had comments in the first place. 68 71 */ -
trunk/src/wp-content/themes/twentyten/footer.php
r22214 r25627 1 1 <?php 2 2 /** 3 * T he template for displaying the footer.3 * Template for displaying the footer 4 4 * 5 5 * Contains the closing of the id=main div and all content … … 17 17 18 18 <?php 19 /* A sidebar in the footer? Yep. You can can customize 19 /** 20 * A sidebar in the footer? Yep. You can can customize 20 21 * your footer with four columns of widgets. 21 22 */ … … 30 31 31 32 <div id="site-generator"> 32 <?php do_action( 'twentyten_credits' ); ?> 33 <?php 34 /** 35 * Fires before the Twenty Ten credits in the footer. 36 * 37 * @since Twenty Ten 1.0 38 */ 39 do_action( 'twentyten_credits' ); ?> 33 40 <a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twentyten' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyten' ); ?>"><?php printf( __( 'Proudly powered by %s.', 'twentyten' ), 'WordPress' ); ?></a> 34 41 </div><!-- #site-generator --> … … 40 47 41 48 <?php 42 /* Always have wp_footer() just before the closing </body> 49 /** 50 * Always have wp_footer() just before the closing </body> 43 51 * tag of your theme, or you will break many plugins, which 44 52 * generally use this hook to reference JavaScript files. -
trunk/src/wp-content/themes/twentyten/functions.php
r24195 r25627 53 53 if ( ! function_exists( 'twentyten_setup' ) ): 54 54 /** 55 * Set sup theme defaults and registers support for various WordPress features.55 * Set up theme defaults and registers support for various WordPress features. 56 56 * 57 57 * Note that this function is hooked into the after_setup_theme hook, which runs … … 62 62 * functions.php file. 63 63 * 64 * @uses add_theme_support() To add support for post thumbnails, custom headers and backgrounds, and automatic feed links.65 * @uses register_nav_menus() To add support for navigation menus.66 * @uses add_editor_style() To style the visual editor.67 * @uses load_theme_textdomain() For translation/localization support.64 * @uses add_theme_support() To add support for post thumbnails, custom headers and backgrounds, and automatic feed links. 65 * @uses register_nav_menus() To add support for navigation menus. 66 * @uses add_editor_style() To style the visual editor. 67 * @uses load_theme_textdomain() For translation/localization support. 68 68 * @uses register_default_headers() To register the default custom header images provided with the theme. 69 * @uses set_post_thumbnail_size() To set a custom post thumbnail size.69 * @uses set_post_thumbnail_size() To set a custom post thumbnail size. 70 70 * 71 71 * @since Twenty Ten 1.0 … … 85 85 add_theme_support( 'automatic-feed-links' ); 86 86 87 // Make theme available for translation 88 // Translations can be filed in the /languages/ directory 87 /** 88 * Make theme available for translation. 89 * Translations can be filed in the /languages/ directory 90 */ 89 91 load_theme_textdomain( 'twentyten', get_template_directory() . '/languages' ); 90 92 … … 103 105 104 106 $custom_header_support = array( 105 // The default image to use. 106 // The %s is a placeholder for the theme template directory URI. 107 /** 108 * The default image to use. 109 * The %s is a placeholder for the theme template directory URI. 110 */ 107 111 'default-image' => '%s/images/headers/path.jpg', 108 112 // The height and width of our custom header. 113 /** 114 * Filter the Twenty Ten default header image width. 115 * 116 * @since Twenty Ten 1.0 117 * 118 * @param int The default header image width in pixels. Default 940. 119 */ 109 120 'width' => apply_filters( 'twentyten_header_image_width', 940 ), 121 /** 122 * Filter the Twenty Ten defaul header image height. 123 * 124 * @since Twenty Ten 1.0 125 * 126 * @param int The default header image height in pixels. Default 198. 127 */ 110 128 'height' => apply_filters( 'twentyten_header_image_height', 198 ), 111 129 // Support flexible heights. … … 130 148 } 131 149 132 // We'll be using post thumbnails for custom header images on posts and pages. 133 // We want them to be 940 pixels wide by 198 pixels tall. 134 // Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php. 150 /** 151 * We'll be using post thumbnails for custom header images on posts and pages. 152 * We want them to be 940 pixels wide by 198 pixels tall. 153 * Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php. 154 */ 135 155 set_post_thumbnail_size( $custom_header_support['width'], $custom_header_support['height'], true ); 136 156 … … 193 213 if ( ! function_exists( 'twentyten_admin_header_style' ) ) : 194 214 /** 195 * Style sthe header image displayed on the Appearance > Header admin panel.215 * Style the header image displayed on the Appearance > Header admin panel. 196 216 * 197 217 * Referenced via add_custom_image_header() in twentyten_setup(). … … 217 237 218 238 /** 219 * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link.239 * Show a home link for our wp_nav_menu() fallback, wp_page_menu(). 220 240 * 221 241 * To override this in a child theme, remove the filter and optionally add … … 223 243 * 224 244 * @since Twenty Ten 1.0 245 * 246 * @param array $args An optional array of arguments. @see wp_page_menu() 225 247 */ 226 248 function twentyten_page_menu_args( $args ) { … … 232 254 233 255 /** 234 * Set sthe post excerpt length to 40 characters.256 * Set the post excerpt length to 40 characters. 235 257 * 236 258 * To override this length in a child theme, remove the filter and add your own … … 238 260 * 239 261 * @since Twenty Ten 1.0 240 * @return int 262 * 263 * @param int $length The number of excerpt characters. 264 * @return int The filtered number of excerpt characters. 241 265 */ 242 266 function twentyten_excerpt_length( $length ) { … … 247 271 if ( ! function_exists( 'twentyten_continue_reading_link' ) ) : 248 272 /** 249 * Returns a "Continue Reading" link for excerpts 250 * 251 * @since Twenty Ten 1.0 252 * @return string "Continue Reading" link 273 * Return a "Continue Reading" link for excerpts. 274 * 275 * @since Twenty Ten 1.0 276 * 277 * @return string "Continue Reading" link. 253 278 */ 254 279 function twentyten_continue_reading_link() { … … 258 283 259 284 /** 260 * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyten_continue_reading_link(). 285 * Replace "[...]" with an ellipsis and twentyten_continue_reading_link(). 286 * 287 * "[...]" is appended to automatically generated excerpts. 261 288 * 262 289 * To override this in a child theme, remove the filter and add your own … … 264 291 * 265 292 * @since Twenty Ten 1.0 266 * @return string An ellipsis 293 * 294 * @param string $more The Read More text. 295 * @return string An ellipsis. 267 296 */ 268 297 function twentyten_auto_excerpt_more( $more ) { … … 272 301 273 302 /** 274 * Add sa pretty "Continue Reading" link to custom post excerpts.303 * Add a pretty "Continue Reading" link to custom post excerpts. 275 304 * 276 305 * To override this link in a child theme, remove the filter and add your own … … 278 307 * 279 308 * @since Twenty Ten 1.0 280 * @return string Excerpt with a pretty "Continue Reading" link 309 * 310 * @param string $output The "Coninue Reading" link. 311 * @return string Excerpt with a pretty "Continue Reading" link. 281 312 */ 282 313 function twentyten_custom_excerpt_more( $output ) { … … 326 357 * 327 358 * @since Twenty Ten 1.0 359 * 360 * @param object $comment The comment object. 361 * @param array $args An array of arguments. @see get_comment_reply_link() 362 * @param int $depth The depth of the comment. 328 363 */ 329 364 function twentyten_comment( $comment, $args, $depth ) { … … 377 412 * 378 413 * @since Twenty Ten 1.0 379 * @uses register_sidebar 414 * 415 * @uses register_sidebar() 380 416 */ 381 417 function twentyten_widgets_init() { … … 450 486 451 487 /** 452 * Remove sthe default styles that are packaged with the Recent Comments widget.488 * Remove the default styles that are packaged with the Recent Comments widget. 453 489 * 454 490 * To override this in a child theme, remove the filter and optionally add your own … … 468 504 if ( ! function_exists( 'twentyten_posted_on' ) ) : 469 505 /** 470 * Print sHTML with meta information for the current post-date/time and author.506 * Print HTML with meta information for the current post-date/time and author. 471 507 * 472 508 * @since Twenty Ten 1.0 … … 491 527 if ( ! function_exists( 'twentyten_posted_in' ) ) : 492 528 /** 493 * Print sHTML with meta information for the current post (category, tags and permalink).529 * Print HTML with meta information for the current post (category, tags and permalink). 494 530 * 495 531 * @since Twenty Ten 1.0 … … 517 553 518 554 /** 519 * Retrieve sthe IDs for images in a gallery.520 * 521 * @uses get_post_galleries() first, if available. Falls back to shortcode parsing,522 * then as last option uses a get_posts() call.555 * Retrieve the IDs for images in a gallery. 556 * 557 * @uses get_post_galleries() First, if available. Falls back to shortcode parsing, 558 * then as last option uses a get_posts() call. 523 559 * 524 560 * @since Twenty Ten 1.6. -
trunk/src/wp-content/themes/twentyten/header.php
r23778 r25627 1 1 <?php 2 2 /** 3 * The Header for our theme.3 * Header template for our theme 4 4 * 5 * Displays all of the <head> section and everything up till <div id="main"> 5 * Displays all of the <head> section and everything up till <div id="main">. 6 6 * 7 7 * @package WordPress … … 38 38 <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" /> 39 39 <?php 40 /* We add some JavaScript to pages with the comment form 40 /** 41 * We add some JavaScript to pages with the comment form 41 42 * to support sites with threaded comments (when in use). 42 43 */ … … 44 45 wp_enqueue_script( 'comment-reply' ); 45 46 46 /* Always have wp_head() just before the closing </head> 47 /** 48 * Always have wp_head() just before the closing </head> 47 49 * tag of your theme, or you will break many plugins, which 48 50 * generally use this hook to add elements to <head> such … … 69 71 // Compatibility with versions of WordPress prior to 3.4. 70 72 if ( function_exists( 'get_custom_header' ) ) { 71 // We need to figure out what the minimum width should be for our featured image. 72 // This result would be the suggested width if the theme were to implement flexible widths. 73 /** 74 * We need to figure out what the minimum width should be for our featured image. 75 * This result would be the suggested width if the theme were to implement flexible widths. 76 */ 73 77 $header_image_width = get_theme_support( 'custom-header', 'width' ); 74 78 } else { -
trunk/src/wp-content/themes/twentyten/index.php
r16480 r25627 1 1 <?php 2 2 /** 3 * The main template file.3 * Main template file 4 4 * 5 5 * This is the most generic template file in a WordPress theme … … 20 20 21 21 <?php 22 /* Run the loop to output the posts. 22 /** 23 * Run the loop to output the posts. 23 24 * If you want to overload this in a child theme then include a file 24 25 * called loop-index.php and that will be used instead. -
trunk/src/wp-content/themes/twentyten/loop-attachment.php
r19599 r25627 1 1 <?php 2 2 /** 3 * The loop that displays an attachment .3 * The loop that displays an attachment 4 4 * 5 5 * The loop displays the posts and the post content. See … … 87 87 ?> 88 88 <p class="attachment"><a href="<?php echo $next_attachment_url; ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php 89 /** 90 * Filter the Twenty Ten default attachment width. 91 * 92 * @since Twenty Ten 1.0 93 * 94 * @param int The default attachment width in pixels. Default 900. 95 */ 89 96 $attachment_width = apply_filters( 'twentyten_attachment_size', 900 ); 97 /** 98 * Filter the Twenty Ten default attachment height. 99 * 100 * @since Twenty Ten 1.0 101 * 102 * @param int The default attachment height in pixels. Default 900. 103 */ 90 104 $attachment_height = apply_filters( 'twentyten_attachment_height', 900 ); 91 105 echo wp_get_attachment_image( $post->ID, array( $attachment_width, $attachment_height ) ); // filterable image width with, essentially, no limit for image height. -
trunk/src/wp-content/themes/twentyten/loop-page.php
r19599 r25627 1 1 <?php 2 2 /** 3 * The loop that displays a page .3 * The loop that displays a page 4 4 * 5 5 * The loop displays the posts and the post content. See -
trunk/src/wp-content/themes/twentyten/loop-single.php
r19599 r25627 1 1 <?php 2 2 /** 3 * The loop that displays a single post .3 * The loop that displays a single post 4 4 * 5 5 * The loop displays the posts and the post content. See … … 38 38 <div id="entry-author-info"> 39 39 <div id="author-avatar"> 40 <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?> 40 <?php 41 //duplicate_hook 42 echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); 43 ?> 41 44 </div><!-- #author-avatar --> 42 45 <div id="author-description"> -
trunk/src/wp-content/themes/twentyten/loop.php
r24131 r25627 1 1 <?php 2 2 /** 3 * The loop that displays posts .3 * The loop that displays posts 4 4 * 5 5 * The loop displays the posts and the post content. See … … 40 40 41 41 <?php 42 /* Start the Loop. 42 /** 43 * Start the Loop. 43 44 * 44 45 * In Twenty Ten we use the same loop in multiple contexts. … … 53 54 * 54 55 * Without further ado, the loop: 55 */ ?> 56 */ 57 ?> 56 58 <?php while ( have_posts() ) : the_post(); ?> 57 59 -
trunk/src/wp-content/themes/twentyten/onecolumn-page.php
r15762 r25627 19 19 20 20 <?php 21 /* Run the loop to output the page. 21 /** 22 * Run the loop to output the page. 22 23 * If you want to overload this in a child theme then include a file 23 24 * called loop-page.php and that will be used instead. -
trunk/src/wp-content/themes/twentyten/page.php
r17340 r25627 1 1 <?php 2 2 /** 3 * T he template for displaying all pages.3 * Template for displaying all pages 4 4 * 5 5 * This is the template that displays all pages by default. … … 19 19 20 20 <?php 21 /* Run the loop to output the page. 21 /** 22 * Run the loop to output the page. 22 23 * If you want to overload this in a child theme then include a file 23 24 * called loop-page.php and that will be used instead. -
trunk/src/wp-content/themes/twentyten/search.php
r15226 r25627 1 1 <?php 2 2 /** 3 * T he template for displaying Search Results pages.3 * Template for displaying Search Results pages 4 4 * 5 5 * @package WordPress … … 16 16 <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyten' ), '<span>' . get_search_query() . '</span>' ); ?></h1> 17 17 <?php 18 /* Run the loop for the search to output the results. 18 /** 19 * Run the loop for the search to output the results. 19 20 * If you want to overload this in a child theme then include a file 20 21 * called loop-search.php and that will be used instead. -
trunk/src/wp-content/themes/twentyten/sidebar-footer.php
r14708 r25627 1 1 <?php 2 2 /** 3 * The Footer widget areas .3 * The Footer widget areas 4 4 * 5 5 * @package WordPress … … 10 10 11 11 <?php 12 /* The footer widget area is triggered if any of the areas 12 /** 13 * The footer widget area is triggered if any of the areas 13 14 * have widgets. So let's check that first. 14 15 * -
trunk/src/wp-content/themes/twentyten/sidebar.php
r16480 r25627 1 1 <?php 2 2 /** 3 * The Sidebar containing the primary and secondary widget areas.3 * Sidebar template containing the primary and secondary widget areas 4 4 * 5 5 * @package WordPress … … 13 13 14 14 <?php 15 /* When we call the dynamic_sidebar() function, it'll spit out 15 /** 16 * When we call the dynamic_sidebar() function, it'll spit out 16 17 * the widgets for that widget area. If it instead returns false, 17 18 * then the sidebar simply doesn't exist, so we'll hard-code in -
trunk/src/wp-content/themes/twentyten/single.php
r17340 r25627 1 1 <?php 2 2 /** 3 * T he Template for displaying all single posts.3 * Template for displaying all single posts 4 4 * 5 5 * @package WordPress … … 14 14 15 15 <?php 16 /* Run the loop to output the post. 16 /** 17 * Run the loop to output the post. 17 18 * If you want to overload this in a child theme then include a file 18 19 * called loop-single.php and that will be used instead. -
trunk/src/wp-content/themes/twentyten/tag.php
r15226 r25627 1 1 <?php 2 2 /** 3 * T he template for displaying Tag Archive pages.3 * Template for displaying Tag Archive pages 4 4 * 5 5 * @package WordPress … … 18 18 19 19 <?php 20 /* Run the loop for the tag archive to output the posts 20 /** 21 * Run the loop for the tag archive to output the posts 21 22 * If you want to overload this in a child theme then include a file 22 23 * called loop-tag.php and that will be used instead.
Note: See TracChangeset
for help on using the changeset viewer.