Changeset 25625
- Timestamp:
- 09/25/2013 04:49:36 PM (12 years ago)
- Location:
- trunk/src/wp-content/themes/twentyeleven
- Files:
-
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyeleven/404.php
r18348 r25625 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/twentyeleven/archive.php
r19241 r25625 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 -
trunk/src/wp-content/themes/twentyeleven/author.php
r19957 r25625 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 … … 16 16 17 17 <?php 18 /* Queue the first post, that way we know 19 * what author we're dealing with (if that is the case). 18 /** 19 * Queue the first post, that way we know what author 20 * we're dealing with (if that is the case). 20 21 * 21 * We reset this later so we can run the loop 22 * properlywith a call to rewind_posts().22 * We reset this later so we can run the loop properly 23 * with a call to rewind_posts(). 23 24 */ 24 25 the_post(); … … 30 31 31 32 <?php 32 /* Since we called the_post() above, we need to 33 /** 34 * Since we called the_post() above, we need to 33 35 * rewind the loop back to the beginning that way 34 36 * we can run the loop properly, in full. … … 44 46 <div id="author-info"> 45 47 <div id="author-avatar"> 46 <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyeleven_author_bio_avatar_size', 60 ) ); ?> 48 <?php 49 /** 50 * Filter the Twenty Eleven author bio avatar size. 51 * 52 * @since Twenty Eleven 1.0 53 * 54 * @param int The height and width avatar dimension in pixels. Default 60. 55 */ 56 echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyeleven_author_bio_avatar_size', 60 ) ); 57 ?> 47 58 </div><!-- #author-avatar --> 48 59 <div id="author-description"> … … 57 68 58 69 <?php 59 /* Include the Post-Format-specific template for the content. 70 /** 71 * Include the Post-Format-specific template for the content. 60 72 * If you want to overload this in a child theme then include a file 61 73 * called content-___.php (where ___ is the Post Format name) and that will be used instead. -
trunk/src/wp-content/themes/twentyeleven/category.php
r18291 r25625 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 … … 22 22 <?php 23 23 $category_description = category_description(); 24 if ( ! empty( $category_description ) ) 24 if ( ! empty( $category_description ) ) { 25 /** 26 * Filter the default Twenty Eleven category description. 27 * 28 * @since Twenty Eleven 1.0 29 * 30 * @param string The default category description HTML. 31 */ 25 32 echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>' ); 33 } 26 34 ?> 27 35 </header> … … 33 41 34 42 <?php 35 /* Include the Post-Format-specific template for the content. 43 /** 44 * Include the Post-Format-specific template for the content. 36 45 * If you want to overload this in a child theme then include a file 37 46 * called content-___.php (where ___ is the Post Format name) and that will be used instead. -
trunk/src/wp-content/themes/twentyeleven/comments.php
r22616 r25625 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 … … 18 18 </div><!-- #comments --> 19 19 <?php 20 /* Stop the rest of comments.php from being processed, 20 /** 21 * Stop the rest of comments.php from being processed, 21 22 * but don't kill the script entirely -- we still have 22 23 * 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 twentyeleven_comment() to format the comments. 50 52 * If you want to overload this in a child theme then you can … … 65 67 66 68 <?php 67 /* If there are no comments and comments are closed, let's leave a little note, shall we? 69 /** 70 * If there are no comments and comments are closed, let's leave a little note, shall we? 68 71 * But we only want the note on posts and pages that had comments in the first place. 69 72 */ -
trunk/src/wp-content/themes/twentyeleven/content-aside.php
r24131 r25625 1 1 <?php 2 2 /** 3 * T he template for displaying posts in the Aside Post Format on index and archive pages3 * Template for displaying posts in the Aside Post Format 4 4 * 5 * Learn more: http://codex.wordpress.org/Post_Formats 5 * Used on index and archive pages. 6 * 7 * @link http://codex.wordpress.org/Post_Formats 6 8 * 7 9 * @package WordPress -
trunk/src/wp-content/themes/twentyeleven/content-featured.php
r24131 r25625 1 1 <?php 2 2 /** 3 * T he template for displaying content featured in the showcase.php page template3 * Template for displaying content featured in the showcase.php page template 4 4 * 5 5 * @package WordPress -
trunk/src/wp-content/themes/twentyeleven/content-gallery.php
r24131 r25625 1 1 <?php 2 2 /** 3 * T he template for displaying posts in the Gallery Post Format on index and archive pages3 * Template for displaying posts in the Gallery Post Format 4 4 * 5 * Learn more: http://codex.wordpress.org/Post_Formats 5 * Used on index and archive pages. 6 * 7 * @link http://codex.wordpress.org/Post_Formats 6 8 * 7 9 * @package WordPress -
trunk/src/wp-content/themes/twentyeleven/content-image.php
r24131 r25625 1 1 <?php 2 2 /** 3 * T he template for displaying posts in the Image Post Format on index and archive pages3 * Template for displaying posts in the Image Post Format 4 4 * 5 * Learn more: http://codex.wordpress.org/Post_Formats 5 * Used on index and archive pages. 6 * 7 * @link http://codex.wordpress.org/Post_Formats 6 8 * 7 9 * @package WordPress -
trunk/src/wp-content/themes/twentyeleven/content-intro.php
r18335 r25625 1 1 <?php 2 2 /** 3 * T he template for displaying page content in the showcase.php page template3 * Template for displaying page content in the showcase.php page template 4 4 * 5 5 * @package WordPress -
trunk/src/wp-content/themes/twentyeleven/content-link.php
r24131 r25625 1 1 <?php 2 2 /** 3 * T he template for displaying posts in the Link Post Format on index and archive pages3 * Template for displaying posts in the Link Post Format 4 4 * 5 * Learn more: http://codex.wordpress.org/Post_Formats 5 * Used on index and archive pages 6 * 7 * @link http://codex.wordpress.org/Post_Formats 6 8 * 7 9 * @package WordPress -
trunk/src/wp-content/themes/twentyeleven/content-page.php
r18385 r25625 1 1 <?php 2 2 /** 3 * T he template used for displaying page content in page.php3 * Template used for displaying page content in page.php 4 4 * 5 5 * @package WordPress -
trunk/src/wp-content/themes/twentyeleven/content-quote.php
r24131 r25625 1 1 <?php 2 2 /** 3 * T he default template for displaying content3 * Template for displaying content 4 4 * 5 5 * @package WordPress -
trunk/src/wp-content/themes/twentyeleven/content-single.php
r19957 r25625 55 55 <div id="author-info"> 56 56 <div id="author-avatar"> 57 <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyeleven_author_bio_avatar_size', 68 ) ); ?> 57 <?php 58 //duplicate_hook 59 echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyeleven_author_bio_avatar_size', 68 ) ); 60 ?> 58 61 </div><!-- #author-avatar --> 59 62 <div id="author-description"> -
trunk/src/wp-content/themes/twentyeleven/content-status.php
r24131 r25625 1 1 <?php 2 2 /** 3 * T he template for displaying posts in the Status Post Format on index and archive pages3 * Template for displaying posts in the Status Post Format 4 4 * 5 * Learn more: http://codex.wordpress.org/Post_Formats 5 * Used on index and archive pages 6 * 7 * @link http://codex.wordpress.org/Post_Formats 6 8 * 7 9 * @package WordPress 8 10 * @subpackage Twenty_Eleven 11 * @since Twenty Eleven 1.0 9 12 */ 10 13 ?> … … 30 33 <?php else : ?> 31 34 <div class="entry-content"> 32 <div class="avatar"><?php echo get_avatar( get_the_author_meta( 'ID' ), apply_filters( 'twentyeleven_status_avatar', '65' ) ); ?></div> 35 <div class="avatar"> 36 <?php 37 /** 38 * Filter the Twenty Eleven status avatar size. 39 * 40 * @since Twenty Eleven 1.0 41 * 42 * @param int The height and width avatar dimensions in pixels. Default 65. 43 */ 44 echo get_avatar( get_the_author_meta( 'ID' ), apply_filters( 'twentyeleven_status_avatar', 65 ) ); 45 ?> 46 </div> 33 47 34 48 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?> -
trunk/src/wp-content/themes/twentyeleven/content.php
r24131 r25625 1 1 <?php 2 2 /** 3 * T he default template for displaying content3 * Template for displaying content 4 4 * 5 5 * @package WordPress -
trunk/src/wp-content/themes/twentyeleven/footer.php
r22214 r25625 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 after … … 16 16 17 17 <?php 18 /* A sidebar in the footer? Yep. You can can customize 18 /** 19 * A sidebar in the footer? Yep. You can can customize 19 20 * your footer with three columns of widgets. 20 21 */ -
trunk/src/wp-content/themes/twentyeleven/functions.php
r24709 r25625 52 52 if ( ! function_exists( 'twentyeleven_setup' ) ): 53 53 /** 54 * Set sup theme defaults and registers support for various WordPress features.54 * Set up theme defaults and registers support for various WordPress features. 55 55 * 56 56 * Note that this function is hooked into the after_setup_theme hook, which runs … … 61 61 * functions.php file. 62 62 * 63 * @uses load_theme_textdomain() For translation/localization support.64 * @uses add_editor_style() To style the visual editor.65 * @uses add_theme_support() To add support for post thumbnails, automatic feed links, custom headers66 * and backgrounds, and post formats.67 * @uses register_nav_menus() To add support for navigation menus.63 * @uses load_theme_textdomain() For translation/localization support. 64 * @uses add_editor_style() To style the visual editor. 65 * @uses add_theme_support() To add support for post thumbnails, automatic feed links, custom headers 66 * and backgrounds, and post formats. 67 * @uses register_nav_menus() To add support for navigation menus. 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 Eleven 1.0 … … 73 73 function twentyeleven_setup() { 74 74 75 /* Make Twenty Eleven available for translation. 75 /** 76 * Make Twenty Eleven available for translation. 76 77 * Translations can be added to the /languages/ directory. 77 * If you're building a theme based on Twenty Eleven, use a find and replace 78 * to change 'twentyeleven' to the name of your theme in all the template files. 78 * If you're building a theme based on Twenty Eleven, use 79 * a find and replace to change 'twentyeleven' to the name 80 * of your theme in all the template files. 79 81 */ 80 82 load_theme_textdomain( 'twentyeleven', get_template_directory() . '/languages' ); … … 106 108 // Add support for custom backgrounds. 107 109 add_theme_support( 'custom-background', array( 108 // Let WordPress know what our default background color is. 109 // This is dependent on our current color scheme. 110 /** 111 * Let WordPress know what our default background color is. 112 * This is dependent on our current color scheme. 113 */ 110 114 'default-color' => $default_background_color, 111 115 ) ); … … 119 123 'default-text-color' => '000', 120 124 // The height and width of our custom header. 125 /** 126 * Filter the Twenty Eleven default header image width. 127 * 128 * @since Twenty Eleven 1.0 129 * 130 * @param int The default header image width in pixels. Default 1000. 131 */ 121 132 'width' => apply_filters( 'twentyeleven_header_image_width', 1000 ), 133 /** 134 * Filter the Twenty Eleven default header image height. 135 * 136 * @since Twenty Eleven 1.0 137 * 138 * @param int The default header image height in pixels. Default 288. 139 */ 122 140 'height' => apply_filters( 'twentyeleven_header_image_height', 288 ), 123 141 // Support flexible heights. … … 145 163 } 146 164 147 // We'll be using post thumbnails for custom header images on posts and pages. 148 // We want them to be the size of the header image that we just defined 149 // Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php. 165 /** 166 * We'll be using post thumbnails for custom header images on posts and pages. 167 * We want them to be the size of the header image that we just defined. 168 * Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php. 169 */ 150 170 set_post_thumbnail_size( $custom_header_support['width'], $custom_header_support['height'], true ); 151 171 152 // Add Twenty Eleven's custom image sizes. 153 // Used for large feature (header) images. 172 /** 173 * Add Twenty Eleven's custom image sizes. 174 * Used for large feature (header) images. 175 */ 154 176 add_image_size( 'large-feature', $custom_header_support['width'], $custom_header_support['height'], true ); 155 177 // Used for featured posts if a large-feature doesn't exist. … … 212 234 if ( ! function_exists( 'twentyeleven_header_style' ) ) : 213 235 /** 214 * Styles the header image and text displayed on the blog 236 * Styles the header image and text displayed on the blog. 215 237 * 216 238 * @since Twenty Eleven 1.0 … … 328 350 329 351 /** 330 * Sets the post excerpt length to 40 words. 331 * 332 * To override this length in a child theme, remove the filter and add your own 333 * function tied to the excerpt_length filter hook. 352 * Set the post excerpt length to 40 words. 353 * 354 * To override this length in a child theme, remove 355 * the filter and add your own function tied to 356 * the excerpt_length filter hook. 357 * 358 * @since Twenty Eleven 1.0 359 * 360 * @param int $length The number of excerpt characters. 361 * @return int The filtered number of characters. 334 362 */ 335 363 function twentyeleven_excerpt_length( $length ) { … … 340 368 if ( ! function_exists( 'twentyeleven_continue_reading_link' ) ) : 341 369 /** 342 * Returns a "Continue Reading" link for excerpts 370 * Return a "Continue Reading" link for excerpts 371 * 372 * @since Twenty Eleven 1.0 373 * 374 * @return string The "Continue Reading" HTML link. 343 375 */ 344 376 function twentyeleven_continue_reading_link() { … … 348 380 349 381 /** 350 * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyeleven_continue_reading_link(). 382 * Replace "[...]" in the Read More link with an ellipsis. 383 * 384 * The "[...]" is appended to automatically generated excerpts. 351 385 * 352 386 * To override this in a child theme, remove the filter and add your own 353 387 * function tied to the excerpt_more filter hook. 388 * 389 * @since Twenty Eleven 1.0 390 * 391 * @param string $more The Read More text. 392 * @return The filtered Read More text. 354 393 */ 355 394 function twentyeleven_auto_excerpt_more( $more ) { … … 359 398 360 399 /** 361 * Add sa pretty "Continue Reading" link to custom post excerpts.400 * Add a pretty "Continue Reading" link to custom post excerpts. 362 401 * 363 402 * To override this link in a child theme, remove the filter and add your own 364 403 * function tied to the get_the_excerpt filter hook. 404 * 405 * @since Twenty Eleven 1.0 406 * 407 * @param string $output The "Continue Reading" link. 408 * @return string The filtered "Continue Reading" link. 365 409 */ 366 410 function twentyeleven_custom_excerpt_more( $output ) { … … 373 417 374 418 /** 375 * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link. 419 * Show a home link for the wp_nav_menu() fallback, wp_page_menu(). 420 * 421 * @since Twenty Eleven 1.0 422 * 423 * @param array $args The page menu arguments. @see wp_page_menu() 424 * @return array The filtered page menu arguments. 376 425 */ 377 426 function twentyeleven_page_menu_args( $args ) { … … 383 432 384 433 /** 385 * Register our sidebars and widgetized areas. Also register the default Epherma widget. 434 * Register sidebars and widgetized areas. 435 * 436 * Also register the default Epherma widget. 386 437 * 387 438 * @since Twenty Eleven 1.0 … … 444 495 if ( ! function_exists( 'twentyeleven_content_nav' ) ) : 445 496 /** 446 * Display navigation to next/previous pages when applicable 497 * Display navigation to next/previous pages when applicable. 498 * 499 * @since Twenty Eleven 1.0 500 * 501 * @param string $html_id The HTML id attribute. 447 502 */ 448 503 function twentyeleven_content_nav( $html_id ) { … … 463 518 * post permalink is used as a fallback. 464 519 * 520 * @since Twenty Eleven 1.0 521 * 465 522 * @uses get_url_in_content() to get the first URL from the post content. 466 523 * 467 * @return string 524 * @return string The first link. 468 525 */ 469 526 function twentyeleven_get_first_url() { … … 474 531 $has_url = twentyeleven_url_grabber(); 475 532 533 //duplicate_hook 476 534 return ( $has_url ) ? $has_url : apply_filters( 'the_permalink', get_permalink() ); 477 535 } … … 481 539 * 482 540 * @since Twenty Eleven 1.0 541 * 483 542 * @return string|bool URL or false when no link is present. 484 543 */ … … 491 550 492 551 /** 493 * Count the number of footer sidebars to enable dynamic classes for the footer 552 * Count the number of footer sidebars to enable dynamic classes for the footer. 553 * 554 * @since Twenty Eleven 1.0 494 555 */ 495 556 function twentyeleven_footer_sidebar_class() { … … 533 594 * 534 595 * @since Twenty Eleven 1.0 596 * 597 * @param object $comment The comment object. 598 * @param array $args An array of comment arguments. @see get_comment_reply_link() 599 * @param int $depth The depth of the comment. 535 600 */ 536 601 function twentyeleven_comment( $comment, $args, $depth ) { … … 594 659 if ( ! function_exists( 'twentyeleven_posted_on' ) ) : 595 660 /** 596 * Prints HTML with meta information for the current post-date/time and author. 661 * Print HTML with meta information for the current post-date/time and author. 662 * 597 663 * Create your own twentyeleven_posted_on to override in a child theme 598 664 * … … 613 679 614 680 /** 615 * Adds two classes to the array of body classes. 681 * Add two classes to the array of body classes. 682 * 616 683 * The first is if the site has only had one author with published posts. 617 684 * The second is if a singular post being displayed 618 685 * 619 686 * @since Twenty Eleven 1.0 687 * 688 * @param array $classes Existing body classes. 689 * @return array The filtered array of body classes. 620 690 */ 621 691 function twentyeleven_body_classes( $classes ) { … … 632 702 633 703 /** 634 * Retrieve sthe IDs for images in a gallery.635 * 636 * @uses get_post_galleries() first, if available. Falls back to shortcode parsing,637 * then as last option uses a get_posts() call.704 * Retrieve the IDs for images in a gallery. 705 * 706 * @uses get_post_galleries() First, if available. Falls back to shortcode parsing, 707 * then as last option uses a get_posts() call. 638 708 * 639 709 * @since Twenty Eleven 1.6. -
trunk/src/wp-content/themes/twentyeleven/header.php
r23778 r25625 1 1 <?php 2 2 /** 3 * The Header for our theme.3 * Header template for the 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 … … 26 26 <meta name="viewport" content="width=device-width" /> 27 27 <title><?php 28 /* 28 /** 29 29 * Print the <title> tag based on what is being viewed. 30 30 */ … … 53 53 <![endif]--> 54 54 <?php 55 /* We add some JavaScript to pages with the comment form 55 /** 56 * We add some JavaScript to pages with the comment form 56 57 * to support sites with threaded comments (when in use). 57 58 */ … … 59 60 wp_enqueue_script( 'comment-reply' ); 60 61 61 /* Always have wp_head() just before the closing </head> 62 /** 63 * Always have wp_head() just before the closing </head> 62 64 * tag of your theme, or you will break many plugins, which 63 65 * generally use this hook to add elements to <head> such … … 82 84 // Compatibility with versions of WordPress prior to 3.4. 83 85 if ( function_exists( 'get_custom_header' ) ) { 84 // We need to figure out what the minimum width should be for our featured image. 85 // This result would be the suggested width if the theme were to implement flexible widths. 86 /** 87 * We need to figure out what the minimum width should be for our featured image. 88 * This result would be the suggested width if the theme were to implement flexible widths. 89 */ 86 90 $header_image_width = get_theme_support( 'custom-header', 'width' ); 87 91 } else { … … 91 95 <a href="<?php echo esc_url( home_url( '/' ) ); ?>"> 92 96 <?php 93 // The header image 94 // Check if this is a post or page, if it has a thumbnail, and if it's a big one 97 /** 98 * The header image. 99 * Check if this is a post or page, if it has a thumbnail, and if it's a big one 100 */ 95 101 if ( is_singular() && has_post_thumbnail( $post->ID ) && 96 102 ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) ) ) && -
trunk/src/wp-content/themes/twentyeleven/image.php
r19582 r25625 1 1 <?php 2 2 /** 3 * T he template for displaying image attachments.3 * Template for displaying image attachments 4 4 * 5 5 * @package WordPress … … 73 73 ?> 74 74 <a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php 75 /** 76 * Filter the Twenty Eleven default attachment size. 77 * 78 * @since Twenty Eleven 1.0 79 * 80 * @param int The height and width attachment size dimensions in pixels. Default 848. 81 */ 75 82 $attachment_size = apply_filters( 'twentyeleven_attachment_size', 848 ); 76 83 echo wp_get_attachment_image( $post->ID, array( $attachment_size, 1024 ) ); // filterable image width with 1024px limit for image height. -
trunk/src/wp-content/themes/twentyeleven/inc/theme-options.php
r20936 r25625 15 15 * @since Twenty Eleven 1.0 16 16 * 17 * @param string $hook_suffix An admin page's hook suffix. 17 18 */ 18 19 function twentyeleven_admin_enqueue_scripts( $hook_suffix ) { … … 52 53 // Register our individual settings fields 53 54 add_settings_field( 54 'color_scheme', // Unique identifier for the field for this section55 __( 'Color Scheme', 'twentyeleven' ), // Setting field label55 'color_scheme', // Unique identifier for the field for this section 56 __( 'Color Scheme', 'twentyeleven' ), // Setting field label 56 57 'twentyeleven_settings_field_color_scheme', // Function that renders the settings field 57 'theme_options', // Menu slug, used to uniquely identify the page; see twentyeleven_theme_options_add_page()58 'general' // Settings section. Same as the first argument in the add_settings_section() above58 'theme_options', // Menu slug, used to uniquely identify the page; see twentyeleven_theme_options_add_page() 59 'general' // Settings section. Same as the first argument in the add_settings_section() above 59 60 ); 60 61 … … 67 68 * Change the capability required to save the 'twentyeleven_options' options group. 68 69 * 69 * @see twentyeleven_theme_options_init() First parameter to register_setting() is the name of the options group.70 * @see twentyeleven_theme_options_init() First parameter to register_setting() is the name of the options group. 70 71 * @see twentyeleven_theme_options_add_page() The edit_theme_options capability is used for viewing the page. 71 72 * … … 84 85 85 86 /** 86 * Add ourtheme options page to the admin menu, including some help documentation.87 * Add a theme options page to the admin menu, including some help documentation. 87 88 * 88 89 * This function is attached to the admin_menu action hook. … … 123 124 124 125 if ( method_exists( $screen, 'add_help_tab' ) ) { 125 // WordPress 3.3 126 // WordPress 3.3.0 126 127 $screen->add_help_tab( array( 127 128 'title' => __( 'Overview', 'twentyeleven' ), … … 133 134 $screen->set_help_sidebar( $sidebar ); 134 135 } else { 135 // WordPress 3.2 136 // WordPress 3.2.0 136 137 add_contextual_help( $screen, $help . $sidebar ); 137 138 } … … 139 140 140 141 /** 141 * Return san array of color schemes registered for Twenty Eleven.142 * Return an array of color schemes registered for Twenty Eleven. 142 143 * 143 144 * @since Twenty Eleven 1.0 … … 159 160 ); 160 161 162 /** 163 * Filter the Twenty Eleven color scheme options. 164 * 165 * @since Twenty Eleven 1.0 166 * 167 * @param array $color_scheme_options An associative array of color scheme options. 168 */ 161 169 return apply_filters( 'twentyeleven_color_schemes', $color_scheme_options ); 162 170 } 163 171 164 172 /** 165 * Return san array of layout options registered for Twenty Eleven.173 * Return an array of layout options registered for Twenty Eleven. 166 174 * 167 175 * @since Twenty Eleven 1.0 … … 186 194 ); 187 195 196 /** 197 * Filter the Twenty Eleven layout options. 198 * 199 * @since Twenty Eleven 1.0 200 * 201 * @param array $layout_options An associative array of layout options. 202 */ 188 203 return apply_filters( 'twentyeleven_layouts', $layout_options ); 189 204 } 190 205 191 206 /** 192 * Returns the default options for Twenty Eleven. 193 * 194 * @since Twenty Eleven 1.0 207 * Return the default options for Twenty Eleven. 208 * 209 * @since Twenty Eleven 1.0 210 * 211 * @return array An array of default theme options. 195 212 */ 196 213 function twentyeleven_get_default_theme_options() { … … 204 221 $default_theme_options['theme_layout'] = 'sidebar-content'; 205 222 223 /** 224 * Filter the Twenty Eleven default options. 225 * 226 * @since Twenty Eleven 1.0 227 * 228 * @param array $default_theme_options An array of default theme options. 229 */ 206 230 return apply_filters( 'twentyeleven_default_theme_options', $default_theme_options ); 207 231 } 208 232 209 233 /** 210 * Returns the default link color for Twenty Eleven, based on color scheme. 211 * 212 * @since Twenty Eleven 1.0 213 * 214 * @param $string $color_scheme Color scheme. Defaults to the active color scheme. 215 * @return $string Color. 234 * Return the default link color for Twenty Eleven, based on color scheme. 235 * 236 * @since Twenty Eleven 1.0 237 * 238 * @param string $color_scheme Optional. Color scheme. 239 * Default null (or the active color scheme). 240 * @return string The default link color. 216 241 */ 217 242 function twentyeleven_get_default_link_color( $color_scheme = null ) { … … 229 254 230 255 /** 231 * Return sthe options array for Twenty Eleven.256 * Return the options array for Twenty Eleven. 232 257 * 233 258 * @since Twenty Eleven 1.0 … … 238 263 239 264 /** 240 * Render sthe Color Scheme setting field.265 * Render the Color Scheme setting field. 241 266 * 242 267 * @since Twenty Eleven 1.3 … … 262 287 263 288 /** 264 * Render sthe Link Color setting field.289 * Render the Link Color setting field. 265 290 * 266 291 * @since Twenty Eleven 1.3 … … 279 304 280 305 /** 281 * Render sthe Layout setting field.306 * Render the Layout setting field. 282 307 * 283 308 * @since Twenty Eleven 1.3 … … 301 326 302 327 /** 303 * Return sthe options array for Twenty Eleven.328 * Return the options array for Twenty Eleven. 304 329 * 305 330 * @since Twenty Eleven 1.2 … … 325 350 326 351 /** 327 * Sanitize and validate form input. Accepts an array, return a sanitized array. 352 * Sanitize and validate form input. 353 * 354 * Accepts an array, return a sanitized array. 328 355 * 329 356 * @see twentyeleven_theme_options_init() … … 331 358 * 332 359 * @since Twenty Eleven 1.0 360 * 361 * @param array $input An array of form input. 333 362 */ 334 363 function twentyeleven_theme_options_validate( $input ) { … … 350 379 $output['theme_layout'] = $input['theme_layout']; 351 380 381 /** 382 * Filter the Twenty Eleven sanitized form input array. 383 * 384 * @since Twenty Eleven 1.0 385 * 386 * @param array $output An array of sanitized form output. 387 * @param array $input An array of un-sanitized form input. 388 * @param array $defaults An array of default theme options. 389 */ 352 390 return apply_filters( 'twentyeleven_theme_options_validate', $output, $input, $defaults ); 353 391 } … … 365 403 wp_enqueue_style( 'dark', get_template_directory_uri() . '/colors/dark.css', array(), null ); 366 404 405 /** 406 * Fires after the styles for the Twenty Eleven color scheme are enqueued. 407 * 408 * @since Twenty Eleven 1.0 409 * 410 * @param string $color_scheme The color scheme. 411 */ 367 412 do_action( 'twentyeleven_enqueue_color_scheme', $color_scheme ); 368 413 } … … 418 463 419 464 /** 420 * Adds Twenty Eleven layout classes to the array of body classes. 421 * 422 * @since Twenty Eleven 1.0 465 * Add Twenty Eleven layout classes to the array of body classes. 466 * 467 * @since Twenty Eleven 1.0 468 * 469 * @param array $existing_classes An array of existing body classes. 423 470 */ 424 471 function twentyeleven_layout_classes( $existing_classes ) { … … 438 485 $classes[] = $current_layout; 439 486 487 /** 488 * Filter the Twenty Eleven layout body classes. 489 * 490 * @since Twenty Eleven 1.0 491 * 492 * @param array $classes An array of body classes. 493 * @param string $current_layout The current theme layout. 494 */ 440 495 $classes = apply_filters( 'twentyeleven_layout_classes', $classes, $current_layout ); 441 496 … … 447 502 * Implements Twenty Eleven theme options into Theme Customizer 448 503 * 449 * @param $wp_customize Theme Customizer object 504 * @since Twenty Eleven 1.3 505 * 506 * @param object $wp_customize Theme Customizer object. 450 507 * @return void 451 508 * 452 * @since Twenty Eleven 1.3453 509 */ 454 510 function twentyeleven_customize_register( $wp_customize ) { … … 522 578 /** 523 579 * Bind JS handlers to make Theme Customizer preview reload changes asynchronously. 580 * 524 581 * Used with blogname and blogdescription. 525 582 * -
trunk/src/wp-content/themes/twentyeleven/inc/widgets.php
r24131 r25625 1 1 <?php 2 2 /** 3 * Makes a custom Widget for displaying Aside, Link, Status, and Quote Posts available with Twenty Eleven3 * Widget For displaying post format posts 4 4 * 5 * Learn more: http://codex.wordpress.org/Widgets_API#Developing_Widgets 5 * Handles displaying Aside, Link, Status, and Quote Posts available with Twenty Eleven. 6 * 7 * @link http://codex.wordpress.org/Widgets_API#Developing_Widgets 6 8 * 7 9 * @package WordPress … … 13 15 /** 14 16 * Constructor 17 * 18 * @since Twenty Eleven 1.0 15 19 * 16 20 * @return void … … 29 33 * Outputs the HTML for this widget. 30 34 * 31 * @param array An array of standard parameters for widgets in this theme 32 * @param array An array of settings for this widget instance 33 * @return void Echoes its output 35 * @since Twenty Eleven 1.0 36 * 37 * @param array $args An array of standard parameters for widgets in this theme. 38 * @param array $instance An array of settings for this widget instance. 39 * @return void 34 40 **/ 35 41 function widget( $args, $instance ) { … … 50 56 extract( $args, EXTR_SKIP ); 51 57 58 //duplicate_hook 52 59 $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Ephemera', 'twentyeleven' ) : $instance['title'], $instance, $this->id_base); 53 60 … … 121 128 122 129 /** 130 * Update widget settings. 131 * 123 132 * Deals with the settings when they are saved by the admin. Here is 124 133 * where any validation should be dealt with. 134 * 135 * @since Twenty Eleven 1.0 125 136 **/ 126 137 function update( $new_instance, $old_instance ) { … … 137 148 } 138 149 150 /** 151 * Flush widget cache. 152 * 153 * @since Twenty Eleven 1.0 154 */ 139 155 function flush_widget_cache() { 140 156 wp_cache_delete( 'widget_twentyeleven_ephemera', 'widget' ); … … 142 158 143 159 /** 160 * Set up the widget form. 161 * 144 162 * Displays the form for this widget on the Widgets page of the WP Admin area. 163 * 164 * @since Twenty Eleven 1.0 145 165 **/ 146 166 function form( $instance ) { -
trunk/src/wp-content/themes/twentyeleven/index.php
r18291 r25625 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 -
trunk/src/wp-content/themes/twentyeleven/page.php
r19379 r25625 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. -
trunk/src/wp-content/themes/twentyeleven/search.php
r17959 r25625 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 … … 25 25 26 26 <?php 27 /* Include the Post-Format-specific template for the content. 27 /** 28 * Include the Post-Format-specific template for the content. 28 29 * If you want to overload this in a child theme then include a file 29 * called content-___.php (where ___ is the Post Format name) and that will be used instead. 30 * called content-___.php (where ___ is the Post Format name) and that 31 * will be used instead. 30 32 */ 31 33 get_template_part( 'content', get_post_format() ); -
trunk/src/wp-content/themes/twentyeleven/searchform.php
r18276 r25625 1 1 <?php 2 2 /** 3 * T he template for displaying search forms in Twenty Eleven3 * Template for displaying search forms in Twenty Eleven 4 4 * 5 5 * @package WordPress -
trunk/src/wp-content/themes/twentyeleven/showcase.php
r24131 r25625 2 2 /** 3 3 * Template Name: Showcase Template 4 * Description: A Page Template that showcases Sticky Posts, Asides, and Blog Posts 4 * 5 * Description: A Page Template that showcases Sticky Posts, Asides, and Blog Posts. 5 6 * 6 7 * The showcase template in Twenty Eleven consists of a featured posts section using sticky posts, -
trunk/src/wp-content/themes/twentyeleven/sidebar-footer.php
r17933 r25625 1 1 <?php 2 2 /** 3 * The Footer widget areas.3 * 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/twentyeleven/sidebar-page.php
r19379 r25625 2 2 /** 3 3 * Template Name: Sidebar Template 4 * Description: A Page Template that adds a sidebar to pages 4 * 5 * Description: A Page Template that adds a sidebar to pages. 5 6 * 6 7 * @package WordPress -
trunk/src/wp-content/themes/twentyeleven/sidebar.php
r18335 r25625 1 1 <?php 2 2 /** 3 * The Sidebar containing the main widget area.3 * Sidebar containing the main widget area 4 4 * 5 5 * @package WordPress -
trunk/src/wp-content/themes/twentyeleven/single.php
r21491 r25625 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 -
trunk/src/wp-content/themes/twentyeleven/tag.php
r18291 r25625 1 1 <?php 2 2 /** 3 * T he template used to display Tag Archive pages3 * Template used to display Tag Archive pages 4 4 * 5 5 * @package WordPress … … 22 22 <?php 23 23 $tag_description = tag_description(); 24 if ( ! empty( $tag_description ) ) 24 if ( ! empty( $tag_description ) ) { 25 /** 26 * Filter the default Twenty Eleven tag description. 27 * 28 * @since Twenty Eleven 1.0 29 * 30 * @param string The default tag description. 31 */ 25 32 echo apply_filters( 'tag_archive_meta', '<div class="tag-archive-meta">' . $tag_description . '</div>' ); 33 } 26 34 ?> 27 35 </header> … … 33 41 34 42 <?php 35 /* Include the Post-Format-specific template for the content. 43 /** 44 * Include the Post-Format-specific template for the content. 36 45 * If you want to overload this in a child theme then include a file 37 * called content-___.php (where ___ is the Post Format name) and that will be used instead. 46 * called content-___.php (where ___ is the Post Format name) and that 47 * will be used instead. 38 48 */ 39 49 get_template_part( 'content', get_post_format() );
Note: See TracChangeset
for help on using the changeset viewer.