Ticket #12695: twenty_ten_docs.diff
File twenty_ten_docs.diff, 19.2 KB (added by , 15 years ago) |
---|
-
wp-content/themes/twentyten/searchform.php
6 6 * when the get_search_form() template tag is used. 7 7 * 8 8 * @package WordPress 9 * @subpackage Twenty Ten 10 * @since 3.0.0 9 * @subpackage Twenty_Ten 10 * @since WordPress 3.0.0 11 * @since Twenty_Ten 1.0.0 11 12 */ 12 13 ?> 13 14 -
wp-content/themes/twentyten/footer.php
6 6 * after. Calls sidebar-footer.php for bottom widgets 7 7 * 8 8 * @package WordPress 9 * @subpackage Twenty Ten 10 * @since 3.0.0 9 * @subpackage Twenty_Ten 10 * @since WordPress 3.0.0 11 * @since Twenty_Ten 1.0.0 11 12 */ 12 13 ?> 13 14 … … 15 16 16 17 <div id="footer"> 17 18 <div id="colophon"> 18 19 <?php /* Add our footer widget areas */ ?> 19 20 <?php get_sidebar( 'footer' ); ?> 20 21 21 22 <div id="site-info"> … … 30 31 </div><!-- #footer --> 31 32 32 33 </div><!-- #wrapper --> 33 34 <?php /* Always have wp_footer() just before the closing </body> tag of your theme if you want many plugins to work */ ?> 34 35 <?php wp_footer(); ?> 35 36 36 37 </body> -
wp-content/themes/twentyten/author.php
3 3 * The template used to display Author Archive pages 4 4 * 5 5 * @package WordPress 6 * @subpackage Twenty Ten 7 * @since 3.0.0 6 * @subpackage Twenty_Ten 7 * @since WordPress 3.0.0 8 * @since Twenty_Ten 1.0.0 8 9 */ 9 10 ?> 10 11 -
wp-content/themes/twentyten/sidebar-footer.php
3 3 * The Footer widget areas 4 4 * 5 5 * @package WordPress 6 * @subpackage Twenty Ten 7 * @since 3.0.0 6 * @subpackage Twenty_Ten 7 * @since WordPress 3.0.0 8 * @since Twenty_Ten 1.0.0 8 9 */ 9 10 ?> 10 11 -
wp-content/themes/twentyten/search.php
3 3 * The Search Results template 4 4 * 5 5 * @package WordPress 6 * @subpackage Twenty Ten 7 * @since 3.0.0 6 * @subpackage Twenty_Ten 7 * @since WordPress 3.0.0 8 * @since Twenty_Ten 1.0.0 8 9 */ 9 10 ?> 10 11 -
wp-content/themes/twentyten/404.php
3 3 * The template for displaying 404 pages (Not Found) 4 4 * 5 5 * @package WordPress 6 * @subpackage Twenty Ten 7 * @since 3.0.0 6 * @subpackage Twenty_Ten 7 * @since WordPress 3.0.0 8 * @since Twenty_Ten 1.0.0 8 9 */ 9 10 ?> 10 11 -
wp-content/themes/twentyten/index.php
5 5 * 6 6 * This is the most generic template file in a WordPress theme 7 7 * and one of the two required files for a theme (the other being style.css). 8 * It is used to display a page when nothing more specific matches a query. 8 * It is used to display a page when nothing more specific matches a query. 9 9 * E.g., it puts together the home page when no home.php file exists. 10 10 * Learn more: http://codex.wordpress.org/Template_Hierarchy 11 11 * 12 12 * @package WordPress 13 * @subpackage Twenty Ten 14 * @since 3.0.0 13 * @subpackage Twenty_Ten 14 * @since WordPress 3.0.0 15 * @since Twenty_Ten 1.0.0 15 16 */ 16 17 17 18 ?> 18 19 19 20 <?php get_header(); ?> 20 21 21 22 <div id="container"> -
wp-content/themes/twentyten/functions.php
37 37 * For more information on hooks, see http://codex.wordpress.org/Plugin_API. 38 38 * 39 39 * @package WordPress 40 * @subpackage Twenty Ten 41 * @since 3.0.0 40 * @subpackage Twenty_Ten 41 * @since WordPress 3.0.0 42 * @since Twenty_Ten 1.0.0 42 43 */ 43 44 44 45 /** … … 71 72 * @uses register_default_headers() To register the default custom header images provided with the theme. 72 73 * @uses set_post_thumbnail_size() To set a custom post thumbnail size. 73 74 * 74 * @since 3.0.0 75 * @since WordPress 3.0.0 76 * @since Twenty_Ten 1.0.0 75 77 */ 76 78 function twentyten_setup() { 77 79 … … 110 112 define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyten_header_image_height', 198 ) ); 111 113 112 114 // We'll be using post thumbnails for custom header images on posts and pages. 113 // We want them to be 940 pixels wide by 198 pixels tall (larger images will be auto-cropped to fit ).115 // We want them to be 940 pixels wide by 198 pixels tall (larger images will be auto-cropped to fit, smaller ones will be ignored See header.php). 114 116 set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true ); 115 117 116 118 // Don't support text inside the header image. … … 173 175 * 174 176 * Referenced via add_custom_image_header() in twentyten_setup(). 175 177 * 176 * @since 3.0.0 178 * @since WordPress 3.0.0 179 * @since Twenty_Ten 1.0.0 177 180 */ 178 181 function twentyten_admin_header_style() { 179 182 ?> … … 196 199 * 197 200 * Used in Twenty Ten's header.php to add the page number to the <title> HTML tag. 198 201 * 199 * @since 3.0.0 202 * @since WordPress 3.0.0 203 * @since Twenty_Ten 1.0.0 200 204 */ 201 205 function twentyten_the_page_number() { 202 206 global $paged; // Contains page number. … … 211 215 * To override this length in a child theme, remove the filter and add your own 212 216 * function tied to the excerpt_length filter hook. 213 217 * 218 * @since WordPress 3.0.0 219 * @since Twenty_Ten 1.0.0 220 * 214 221 * @return int 215 222 */ 216 223 function twentyten_excerpt_length( $length ) { … … 224 231 * To override this link in a child theme, remove the filter and add your own 225 232 * function tied to the excerpt_more filter hook. 226 233 * 227 * @since 3.0.0 234 * @since WordPress 3.0.0 235 * @since Twenty_Ten 1.0.0 228 236 * @return string A pretty 'Continue reading' link. 229 237 */ 230 238 function twentyten_excerpt_more( $more ) { … … 237 245 * 238 246 * Galleries are styled by the theme in Twenty Ten's style.css. 239 247 * 248 * @since WordPress 3.0.0 249 * @since Twenty_Ten 1.0.0 250 * 240 251 * @return string The gallery style filter, with the styles themselves removed. 241 252 */ 242 253 function twentyten_remove_gallery_css( $css ) { … … 253 264 * 254 265 * Used as a callback by wp_list_comments() for displaying the comments. 255 266 * 256 * @since 3.0.0 267 * @since WordPress 3.0.0 268 * @since Twenty_Ten 1.0.0 257 269 */ 258 270 function twentyten_comment( $comment, $args, $depth ) { 259 271 $GLOBALS ['comment'] = $comment; ?> … … 294 306 * 295 307 * @uses twentyten_term_list 296 308 * 309 * @since WordPress 3.0.0 310 * @since Twenty_Ten 1.0.0 311 * 297 312 * @return string 298 313 */ 299 314 function twentyten_cat_list() { … … 308 323 * Returns the list of tags based on if we are or are not 309 324 * browsing a tag archive page 310 325 * 326 * @since WordPress 3.0.0 327 * @since Twenty_Ten 1.0.0 328 * 311 329 * @uses twentyten_term_list 312 330 * 313 331 * @return string … … 327 345 * type of page. If browsing a term archive page and the 328 346 * post has no other taxonomied terms, it returns empty 329 347 * 348 * @since WordPress 3.0.0 349 * @since Twenty_Ten 1.0.0 350 * 330 351 * @return string 331 352 */ 332 353 function twentyten_term_list( $taxonomy, $glue = ', ', $text = '', $also_text = '' ) { … … 361 382 * 362 383 * To override twentyten_widgets_init() in a child theme, remove the action hook and add your own 363 384 * function tied to the init hook. 385 * 386 * @since WordPress 3.0.0 387 * @since Twenty_Ten 1.0.0 388 * 364 389 * @uses register_sidebar 365 390 */ 366 391 function twentyten_widgets_init() { 367 // Area 1 392 // Area 1 located at the top of the sidebar 368 393 register_sidebar( array ( 369 394 'name' => 'Primary Widget Area', 370 395 'id' => 'primary-widget-area', … … 375 400 'after_title' => '</h3>', 376 401 ) ); 377 402 378 // Area 2 403 // Area 2 located below the Primary Widget Area in the sidebar. Empty by default and design 379 404 register_sidebar( array ( 380 405 'name' => 'Secondary Widget Area', 381 406 'id' => 'secondary-widget-area', … … 386 411 'after_title' => '</h3>', 387 412 ) ); 388 413 389 // Area 3 414 // Area 3 located in the footer. Empty by default 390 415 register_sidebar( array ( 391 416 'name' => 'First Footer Widget Area', 392 417 'id' => 'first-footer-widget-area', … … 397 422 'after_title' => '</h3>', 398 423 ) ); 399 424 400 // Area 4 425 // Area 4 located in the footer. Empty by default 401 426 register_sidebar( array ( 402 427 'name' => 'Second Footer Widget Area', 403 428 'id' => 'second-footer-widget-area', … … 408 433 'after_title' => '</h3>', 409 434 ) ); 410 435 411 // Area 5 436 // Area 5 located in the footer. Empty by default 412 437 register_sidebar( array ( 413 438 'name' => 'Third Footer Widget Area', 414 439 'id' => 'third-footer-widget-area', … … 419 444 'after_title' => '</h3>', 420 445 ) ); 421 446 422 // Area 6 447 // Area 6 located in the footer. Empty by default 423 448 register_sidebar( array ( 424 449 'name' => 'Fourth Footer Widget Area', 425 450 'id' => 'fourth-footer-widget-area', -
wp-content/themes/twentyten/loop.php
8 8 * the tags used in it. 9 9 * 10 10 * @package WordPress 11 * @subpackage Twenty Ten 12 * @since 3.0.0 11 * @subpackage Twenty_Ten 12 * @since WordPress 3.0.0 13 * @since Twenty_Ten 1.0.0 13 14 */ 14 15 ?> 15 16 -
wp-content/themes/twentyten/onecolumn-page.php
6 6 * Selectable from a dropdown menu on the edit page screen. 7 7 * 8 8 * @package WordPress 9 * @subpackage Twenty Ten 10 * @since 3.0.0 9 * @subpackage Twenty_Ten 10 * @since WordPress 3.0.0 11 * @since Twenty_Ten 1.0.0 11 12 */ 12 13 ?> 13 14 -
wp-content/themes/twentyten/sidebar.php
3 3 * The Sidebar containing the primary and secondary widget areas 4 4 * 5 5 * @package WordPress 6 * @subpackage Twenty Ten 7 * @since 3.0.0 6 * @subpackage Twenty_Ten 7 * @since WordPress 3.0.0 8 * @since Twenty_Ten 1.0.0 8 9 */ 9 10 ?> 10 11 -
wp-content/themes/twentyten/tag.php
3 3 * The template used to display Tag Archive pages 4 4 * 5 5 * @package WordPress 6 * @subpackage Twenty Ten 7 * @since 3.0.0 6 * @subpackage Twenty_Ten 7 * @since WordPress 3.0.0 8 * @since Twenty_Ten 1.0.0 8 9 */ 9 10 ?> 10 11 … … 18 19 <h1 class="page-title"><?php 19 20 printf( __( 'Tag Archives: %s', 'twentyten' ), '<span>' . single_tag_title( '', false ) . '</span>' ); 20 21 ?></h1> 21 22 <?php /* Since we used the_post and single_tag_title to set our page title, we need to rewind_post to reset the loop counter and properly loop through them. */ ?> 22 23 <?php rewind_posts(); ?> 23 24 24 25 <?php -
wp-content/themes/twentyten/page.php
8 8 * different template. 9 9 * 10 10 * @package WordPress 11 * @subpackage Twenty Ten 12 * @since 3.0.0 11 * @subpackage Twenty_Ten 12 * @since WordPress 3.0.0 13 * @since Twenty_Ten 1.0.0 13 14 */ 14 15 ?> 15 16 … … 23 24 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 24 25 <?php if ( is_front_page() ) { ?> 25 26 <h2 class="entry-title"><?php the_title(); ?></h2> 26 <?php } else { ?> 27 <?php } else { ?> 27 28 <h1 class="entry-title"><?php the_title(); ?></h1> 28 <?php } ?> 29 <?php } ?> 29 30 30 31 <div class="entry-content"> 31 32 <?php the_content(); ?> -
wp-content/themes/twentyten/category.php
3 3 * The template used to display Category Archive pages 4 4 * 5 5 * @package WordPress 6 * @subpackage Twenty Ten 7 * @since 3.0.0 6 * @subpackage Twenty_Ten 7 * @since WordPress 3.0.0 8 * @since Twenty_Ten 1.0.0 8 9 */ 9 10 ?> 10 11 … … 16 17 <h1 class="page-title"><?php 17 18 printf( __( 'Category Archives: %s', 'twentyten' ), '<span>' . single_cat_title( '', false ) . '</span>' ); 18 19 ?></h1> 20 21 <?php /* If a category description is set for this catagory, we display it. If you want to remove it, you can apply a filter to archive_meta that returns an empty string */ ?> 19 22 <?php $categorydesc = category_description(); if ( ! empty( $categorydesc ) ) echo apply_filters( 'archive_meta', '<div class="archive-meta">' . $categorydesc . '</div>' ); ?> 20 23 21 24 <?php -
wp-content/themes/twentyten/archive.php
8 8 * Learn more: http://codex.wordpress.org/Template_Hierarchy 9 9 * 10 10 * @package WordPress 11 * @subpackage Twenty Ten 12 * @since 3.0.0 11 * @subpackage Twenty_Ten 12 * @since WordPress 3.0.0 13 * @since Twenty_Ten 1.0.0 13 14 */ 14 15 ?> 15 16 -
wp-content/themes/twentyten/single.php
3 3 * The Template used to display all single posts 4 4 * 5 5 * @package WordPress 6 * @subpackage Twenty Ten 7 * @since 3.0.0 6 * @subpackage Twenty_Ten 7 * @since WordPress 3.0.0 8 * @since Twenty_Ten 1.0.0 8 9 */ 9 10 ?> 10 11 -
wp-content/themes/twentyten/comments.php
8 8 * located in the functions.php file 9 9 * 10 10 * @package WordPress 11 * @subpackage Twenty Ten 12 * @since 3.0.0 11 * @subpackage Twenty_Ten 12 * @since WordPress 3.0.0 13 * @since Twenty_Ten 1.0.0 13 14 */ 14 15 ?> 15 16 -
wp-content/themes/twentyten/header.php
5 5 * Displays all of the <head> section and everything up till <div id="main"> 6 6 * 7 7 * @package WordPress 8 * @subpackage Twenty Ten 9 * @since 3.0.0 8 * @subpackage Twenty_Ten 9 * @since WordPress 3.0.0 10 * @since Twenty_Ten 1.0.0 10 11 */ 11 12 ?> 12 13 … … 16 17 <meta charset="<?php bloginfo( 'charset' ); ?>" /> 17 18 <title><?php 18 19 // Returns the title based on the type of page being viewed 19 if ( is_single() ) { 20 if ( is_single() ) { // Single post pages 20 21 single_post_title(); echo ' | '; bloginfo( 'name' ); 21 } elseif ( is_home() || is_front_page() ) { 22 } elseif ( is_home() || is_front_page() ) { // Both the home page and if using a static front page, the blog post page 22 23 bloginfo( 'name' ); echo ' | '; bloginfo( 'description' ); twentyten_the_page_number(); 23 } elseif ( is_page() ) { 24 } elseif ( is_page() ) { // All Pages 24 25 single_post_title( '' ); echo ' | '; bloginfo( 'name' ); 25 } elseif ( is_search() ) { 26 } elseif ( is_search() ) { // Search result pages 26 27 printf( __( 'Search results for "%s"', 'twentyten' ), esc_html( $s ) ); twentyten_the_page_number(); echo ' | '; bloginfo( 'name' ); 27 } elseif ( is_404() ) { 28 } elseif ( is_404() ) { // 404, nothing found pages 28 29 _e( 'Not Found', 'twentyten' ); echo ' | '; bloginfo( 'name' ); 29 } else { 30 } else { // Everything else 30 31 wp_title( '' ); echo ' | '; bloginfo( 'name' ); twentyten_the_page_number(); 31 32 } 32 33 ?></title> 33 34 <link rel="profile" href="http://gmpg.org/xfn/11" /> 34 35 <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" /> 35 <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>36 <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); //On pages that have comment forms, we add some javascript to make threaded comments work ?> 36 37 <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" /> 38 <?php /* Always have wp_head() in the </head> of your theme if you want many plugins to work */ ?> 37 39 <?php wp_head(); ?> 40 38 41 </head> 39 42 40 43 <body <?php body_class(); ?>> … … 44 47 <div id="branding"> 45 48 <?php if ( is_home() || is_front_page() ) { ?> 46 49 <h1 id="site-title"><span><a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></h1> 47 <?php } else { ?> 50 <?php } else { ?> 48 51 <div id="site-title"><span><a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></div> 49 52 <?php } ?> 50 53 51 54 <div id="site-description"><?php bloginfo( 'description' ); ?></div> 52 55 53 56 <?php 54 57 // Retrieve the dimensions of the current post thumbnail -- no teensy header images for us! 55 58 $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail'); 56 59 list($src, $width, $height) = $image; 57 60 58 61 // Check if this is a post or page, if it has a thumbnail, and if it's a big one 59 if ( is_singular() && has_post_thumbnail( $post->ID ) && $width >= HEADER_IMAGE_WIDTH ) : 62 if ( is_singular() && has_post_thumbnail( $post->ID ) && $width >= HEADER_IMAGE_WIDTH ) : 60 63 // Houston, we have a new header image! 61 64 echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' ); 62 65 else : ?> … … 65 68 </div><!-- #branding --> 66 69 67 70 <div id="access"> 71 <?php /* Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?> 68 72 <div class="skip-link screen-reader-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyten' ); ?>"><?php _e( 'Skip to content', 'twentyten' ); ?></a></div> 73 <?php /* Our navigation menu. If one isn't filled out, wp_nav_menu falls back to wp_page_menu */ ?> 69 74 <?php wp_nav_menu( array( 'sort_column' => 'menu_order', 'container_class' => 'menu-header' ) ); ?> 70 75 </div><!-- #access --> 71 76 </div><!-- #masthead --> -
wp-content/themes/twentyten/attachment.php
3 3 * The template used to display attachments. 4 4 * 5 5 * @package WordPress 6 * @subpackage Twenty Ten 7 * @since 3.0.0 6 * @subpackage Twenty_Ten 7 * @since WordPress 3.0.0 8 * @since Twenty_Ten 1.0.0 8 9 */ 9 10 ?> 10 11