Make WordPress Core

Changeset 25625


Ignore:
Timestamp:
09/25/2013 04:49:36 PM (12 years ago)
Author:
lancewillett
Message:

Twenty Eleven: update code comments to reflect WP inline docs standards. Props DrewAPicture, see #25256.

Location:
trunk/src/wp-content/themes/twentyeleven
Files:
32 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyeleven/404.php

    r18348 r25625  
    11<?php
    22/**
    3  * The template for displaying 404 pages (Not Found).
     3 * Template for displaying 404 pages (Not Found)
    44 *
    55 * @package WordPress
  • trunk/src/wp-content/themes/twentyeleven/archive.php

    r19241 r25625  
    11<?php
    22/**
    3  * The template for displaying Archive pages.
     3 * Template for displaying Archive pages
    44 *
    55 * Used to display archive-type pages if nothing more specific matches a query.
    66 * For example, puts together date-based pages if no date.php file exists.
    77 *
    8  * Learn more: http://codex.wordpress.org/Template_Hierarchy
     8 * @link http://codex.wordpress.org/Template_Hierarchy
    99 *
    1010 * @package WordPress
  • trunk/src/wp-content/themes/twentyeleven/author.php

    r19957 r25625  
    11<?php
    22/**
    3  * The template for displaying Author Archive pages.
     3 * Template for displaying Author Archive pages
    44 *
    55 * @package WordPress
     
    1616
    1717                <?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).
    2021                     *
    21                      * We reset this later so we can run the loop
    22                      * properly with a call to rewind_posts().
     22                     * We reset this later so we can run the loop properly
     23                     * with a call to rewind_posts().
    2324                     */
    2425                    the_post();
     
    3031
    3132                <?php
    32                     /* Since we called the_post() above, we need to
     33                    /**
     34                     * Since we called the_post() above, we need to
    3335                     * rewind the loop back to the beginning that way
    3436                     * we can run the loop properly, in full.
     
    4446                <div id="author-info">
    4547                    <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                        ?>
    4758                    </div><!-- #author-avatar -->
    4859                    <div id="author-description">
     
    5768
    5869                    <?php
    59                         /* Include the Post-Format-specific template for the content.
     70                        /**
     71                         * Include the Post-Format-specific template for the content.
    6072                         * If you want to overload this in a child theme then include a file
    6173                         * 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  
    11<?php
    22/**
    3  * The template for displaying Category Archive pages.
     3 * Template for displaying Category Archive pages
    44 *
    55 * @package WordPress
     
    2222                    <?php
    2323                        $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                             */
    2532                            echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>' );
     33                        }
    2634                    ?>
    2735                </header>
     
    3341
    3442                    <?php
    35                         /* Include the Post-Format-specific template for the content.
     43                        /**
     44                         * Include the Post-Format-specific template for the content.
    3645                         * If you want to overload this in a child theme then include a file
    3746                         * 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  
    11<?php
    22/**
    3  * The template for displaying Comments.
     3 * Template for displaying Comments
    44 *
    55 * The area of the page that contains both current comments
     
    1818    </div><!-- #comments -->
    1919    <?php
    20             /* Stop the rest of comments.php from being processed,
     20            /**
     21             * Stop the rest of comments.php from being processed,
    2122             * but don't kill the script entirely -- we still have
    2223             * to fully load the template.
     
    4647        <ol class="commentlist">
    4748            <?php
    48                 /* Loop through and list the comments. Tell wp_list_comments()
     49                /**
     50                 * Loop through and list the comments. Tell wp_list_comments()
    4951                 * to use twentyeleven_comment() to format the comments.
    5052                 * If you want to overload this in a child theme then you can
     
    6567
    6668        <?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?
    6871         * But we only want the note on posts and pages that had comments in the first place.
    6972         */
  • trunk/src/wp-content/themes/twentyeleven/content-aside.php

    r24131 r25625  
    11<?php
    22/**
    3  * The template for displaying posts in the Aside Post Format on index and archive pages
     3 * Template for displaying posts in the Aside Post Format
    44 *
    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
    68 *
    79 * @package WordPress
  • trunk/src/wp-content/themes/twentyeleven/content-featured.php

    r24131 r25625  
    11<?php
    22/**
    3  * The template for displaying content featured in the showcase.php page template
     3 * Template for displaying content featured in the showcase.php page template
    44 *
    55 * @package WordPress
  • trunk/src/wp-content/themes/twentyeleven/content-gallery.php

    r24131 r25625  
    11<?php
    22/**
    3  * The template for displaying posts in the Gallery Post Format on index and archive pages
     3 * Template for displaying posts in the Gallery Post Format
    44 *
    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
    68 *
    79 * @package WordPress
  • trunk/src/wp-content/themes/twentyeleven/content-image.php

    r24131 r25625  
    11<?php
    22/**
    3  * The template for displaying posts in the Image Post Format on index and archive pages
     3 * Template for displaying posts in the Image Post Format
    44 *
    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
    68 *
    79 * @package WordPress
  • trunk/src/wp-content/themes/twentyeleven/content-intro.php

    r18335 r25625  
    11<?php
    22/**
    3  * The template for displaying page content in the showcase.php page template
     3 * Template for displaying page content in the showcase.php page template
    44 *
    55 * @package WordPress
  • trunk/src/wp-content/themes/twentyeleven/content-link.php

    r24131 r25625  
    11<?php
    22/**
    3  * The template for displaying posts in the Link Post Format on index and archive pages
     3 * Template for displaying posts in the Link Post Format
    44 *
    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
    68 *
    79 * @package WordPress
  • trunk/src/wp-content/themes/twentyeleven/content-page.php

    r18385 r25625  
    11<?php
    22/**
    3  * The template used for displaying page content in page.php
     3 * Template used for displaying page content in page.php
    44 *
    55 * @package WordPress
  • trunk/src/wp-content/themes/twentyeleven/content-quote.php

    r24131 r25625  
    11<?php
    22/**
    3  * The default template for displaying content
     3 * Template for displaying content
    44 *
    55 * @package WordPress
  • trunk/src/wp-content/themes/twentyeleven/content-single.php

    r19957 r25625  
    5555        <div id="author-info">
    5656            <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                ?>
    5861            </div><!-- #author-avatar -->
    5962            <div id="author-description">
  • trunk/src/wp-content/themes/twentyeleven/content-status.php

    r24131 r25625  
    11<?php
    22/**
    3  * The template for displaying posts in the Status Post Format on index and archive pages
     3 * Template for displaying posts in the Status Post Format
    44 *
    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
    68 *
    79 * @package WordPress
    810 * @subpackage Twenty_Eleven
     11 * @since Twenty Eleven 1.0
    912 */
    1013?>
     
    3033        <?php else : ?>
    3134        <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>
    3347
    3448            <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
  • trunk/src/wp-content/themes/twentyeleven/content.php

    r24131 r25625  
    11<?php
    22/**
    3  * The default template for displaying content
     3 * Template for displaying content
    44 *
    55 * @package WordPress
  • trunk/src/wp-content/themes/twentyeleven/footer.php

    r22214 r25625  
    11<?php
    22/**
    3  * The template for displaying the footer.
     3 * Template for displaying the footer
    44 *
    55 * Contains the closing of the id=main div and all content after
     
    1616
    1717            <?php
    18                 /* A sidebar in the footer? Yep. You can can customize
     18                /**
     19                 * A sidebar in the footer? Yep. You can can customize
    1920                 * your footer with three columns of widgets.
    2021                 */
  • trunk/src/wp-content/themes/twentyeleven/functions.php

    r24709 r25625  
    5252if ( ! function_exists( 'twentyeleven_setup' ) ):
    5353/**
    54  * Sets up theme defaults and registers support for various WordPress features.
     54 * Set up theme defaults and registers support for various WordPress features.
    5555 *
    5656 * Note that this function is hooked into the after_setup_theme hook, which runs
     
    6161 * functions.php file.
    6262 *
    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.
     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.
    6868 * @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.
    7070 *
    7171 * @since Twenty Eleven 1.0
     
    7373function twentyeleven_setup() {
    7474
    75     /* Make Twenty Eleven available for translation.
     75    /**
     76     * Make Twenty Eleven available for translation.
    7677     * 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.
    7981     */
    8082    load_theme_textdomain( 'twentyeleven', get_template_directory() . '/languages' );
     
    106108    // Add support for custom backgrounds.
    107109    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         */
    110114        'default-color' => $default_background_color,
    111115    ) );
     
    119123        'default-text-color' => '000',
    120124        // 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         */
    121132        '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         */
    122140        'height' => apply_filters( 'twentyeleven_header_image_height', 288 ),
    123141        // Support flexible heights.
     
    145163    }
    146164
    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     */
    150170    set_post_thumbnail_size( $custom_header_support['width'], $custom_header_support['height'], true );
    151171
    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     */
    154176    add_image_size( 'large-feature', $custom_header_support['width'], $custom_header_support['height'], true );
    155177    // Used for featured posts if a large-feature doesn't exist.
     
    212234if ( ! function_exists( 'twentyeleven_header_style' ) ) :
    213235/**
    214  * Styles the header image and text displayed on the blog
     236 * Styles the header image and text displayed on the blog.
    215237 *
    216238 * @since Twenty Eleven 1.0
     
    328350
    329351/**
    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.
    334362 */
    335363function twentyeleven_excerpt_length( $length ) {
     
    340368if ( ! function_exists( 'twentyeleven_continue_reading_link' ) ) :
    341369/**
    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.
    343375 */
    344376function twentyeleven_continue_reading_link() {
     
    348380
    349381/**
    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.
    351385 *
    352386 * To override this in a child theme, remove the filter and add your own
    353387 * 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.
    354393 */
    355394function twentyeleven_auto_excerpt_more( $more ) {
     
    359398
    360399/**
    361  * Adds a pretty "Continue Reading" link to custom post excerpts.
     400 * Add a pretty "Continue Reading" link to custom post excerpts.
    362401 *
    363402 * To override this link in a child theme, remove the filter and add your own
    364403 * 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.
    365409 */
    366410function twentyeleven_custom_excerpt_more( $output ) {
     
    373417
    374418/**
    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.
    376425 */
    377426function twentyeleven_page_menu_args( $args ) {
     
    383432
    384433/**
    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.
    386437 *
    387438 * @since Twenty Eleven 1.0
     
    444495if ( ! function_exists( 'twentyeleven_content_nav' ) ) :
    445496/**
    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.
    447502 */
    448503function twentyeleven_content_nav( $html_id ) {
     
    463518 * post permalink is used as a fallback.
    464519 *
     520 * @since Twenty Eleven 1.0
     521 *
    465522 * @uses get_url_in_content() to get the first URL from the post content.
    466523 *
    467  * @return string
     524 * @return string The first link.
    468525 */
    469526function twentyeleven_get_first_url() {
     
    474531        $has_url = twentyeleven_url_grabber();
    475532
     533    //duplicate_hook
    476534    return ( $has_url ) ? $has_url : apply_filters( 'the_permalink', get_permalink() );
    477535}
     
    481539 *
    482540 * @since Twenty Eleven 1.0
     541 *
    483542 * @return string|bool URL or false when no link is present.
    484543 */
     
    491550
    492551/**
    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
    494555 */
    495556function twentyeleven_footer_sidebar_class() {
     
    533594 *
    534595 * @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.
    535600 */
    536601function twentyeleven_comment( $comment, $args, $depth ) {
     
    594659if ( ! function_exists( 'twentyeleven_posted_on' ) ) :
    595660/**
    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 *
    597663 * Create your own twentyeleven_posted_on to override in a child theme
    598664 *
     
    613679
    614680/**
    615  * Adds two classes to the array of body classes.
     681 * Add two classes to the array of body classes.
     682 *
    616683 * The first is if the site has only had one author with published posts.
    617684 * The second is if a singular post being displayed
    618685 *
    619686 * @since Twenty Eleven 1.0
     687 *
     688 * @param array $classes Existing body classes.
     689 * @return array The filtered array of body classes.
    620690 */
    621691function twentyeleven_body_classes( $classes ) {
     
    632702
    633703/**
    634  * Retrieves the 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.
    638708 *
    639709 * @since Twenty Eleven 1.6.
  • trunk/src/wp-content/themes/twentyeleven/header.php

    r23778 r25625  
    11<?php
    22/**
    3  * The Header for our theme.
     3 * Header template for the theme
    44 *
    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">.
    66 *
    77 * @package WordPress
     
    2626<meta name="viewport" content="width=device-width" />
    2727<title><?php
    28     /*
     28    /**
    2929     * Print the <title> tag based on what is being viewed.
    3030     */
     
    5353<![endif]-->
    5454<?php
    55     /* We add some JavaScript to pages with the comment form
     55    /**
     56     * We add some JavaScript to pages with the comment form
    5657     * to support sites with threaded comments (when in use).
    5758     */
     
    5960        wp_enqueue_script( 'comment-reply' );
    6061
    61     /* Always have wp_head() just before the closing </head>
     62    /**
     63     * Always have wp_head() just before the closing </head>
    6264     * tag of your theme, or you will break many plugins, which
    6365     * generally use this hook to add elements to <head> such
     
    8284                    // Compatibility with versions of WordPress prior to 3.4.
    8385                    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                         */
    8690                        $header_image_width = get_theme_support( 'custom-header', 'width' );
    8791                    } else {
     
    9195            <a href="<?php echo esc_url( home_url( '/' ) ); ?>">
    9296                <?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                     */
    95101                    if ( is_singular() && has_post_thumbnail( $post->ID ) &&
    96102                            ( /* $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  
    11<?php
    22/**
    3  * The template for displaying image attachments.
     3 * Template for displaying image attachments
    44 *
    55 * @package WordPress
     
    7373?>
    7474                                    <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                                     */
    7582                                    $attachment_size = apply_filters( 'twentyeleven_attachment_size', 848 );
    7683                                    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  
    1515 * @since Twenty Eleven 1.0
    1616 *
     17 * @param string $hook_suffix An admin page's hook suffix.
    1718 */
    1819function twentyeleven_admin_enqueue_scripts( $hook_suffix ) {
     
    5253    // Register our individual settings fields
    5354    add_settings_field(
    54         'color_scheme',  // Unique identifier for the field for this section
    55         __( 'Color Scheme', 'twentyeleven' ), // Setting field label
     55        'color_scheme',                             // Unique identifier for the field for this section
     56        __( 'Color Scheme', 'twentyeleven' ),       // Setting field label
    5657        '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() above
     58        '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
    5960    );
    6061
     
    6768 * Change the capability required to save the 'twentyeleven_options' options group.
    6869 *
    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.
    7071 * @see twentyeleven_theme_options_add_page() The edit_theme_options capability is used for viewing the page.
    7172 *
     
    8485
    8586/**
    86  * Add our theme options page to the admin menu, including some help documentation.
     87 * Add a theme options page to the admin menu, including some help documentation.
    8788 *
    8889 * This function is attached to the admin_menu action hook.
     
    123124
    124125    if ( method_exists( $screen, 'add_help_tab' ) ) {
    125         // WordPress 3.3
     126        // WordPress 3.3.0
    126127        $screen->add_help_tab( array(
    127128            'title' => __( 'Overview', 'twentyeleven' ),
     
    133134        $screen->set_help_sidebar( $sidebar );
    134135    } else {
    135         // WordPress 3.2
     136        // WordPress 3.2.0
    136137        add_contextual_help( $screen, $help . $sidebar );
    137138    }
     
    139140
    140141/**
    141  * Returns an array of color schemes registered for Twenty Eleven.
     142 * Return an array of color schemes registered for Twenty Eleven.
    142143 *
    143144 * @since Twenty Eleven 1.0
     
    159160    );
    160161
     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     */
    161169    return apply_filters( 'twentyeleven_color_schemes', $color_scheme_options );
    162170}
    163171
    164172/**
    165  * Returns an array of layout options registered for Twenty Eleven.
     173 * Return an array of layout options registered for Twenty Eleven.
    166174 *
    167175 * @since Twenty Eleven 1.0
     
    186194    );
    187195
     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     */
    188203    return apply_filters( 'twentyeleven_layouts', $layout_options );
    189204}
    190205
    191206/**
    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.
    195212 */
    196213function twentyeleven_get_default_theme_options() {
     
    204221        $default_theme_options['theme_layout'] = 'sidebar-content';
    205222
     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     */
    206230    return apply_filters( 'twentyeleven_default_theme_options', $default_theme_options );
    207231}
    208232
    209233/**
    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.
    216241*/
    217242function twentyeleven_get_default_link_color( $color_scheme = null ) {
     
    229254
    230255/**
    231  * Returns the options array for Twenty Eleven.
     256 * Return the options array for Twenty Eleven.
    232257 *
    233258 * @since Twenty Eleven 1.0
     
    238263
    239264/**
    240  * Renders the Color Scheme setting field.
     265 * Render the Color Scheme setting field.
    241266 *
    242267 * @since Twenty Eleven 1.3
     
    262287
    263288/**
    264  * Renders the Link Color setting field.
     289 * Render the Link Color setting field.
    265290 *
    266291 * @since Twenty Eleven 1.3
     
    279304
    280305/**
    281  * Renders the Layout setting field.
     306 * Render the Layout setting field.
    282307 *
    283308 * @since Twenty Eleven 1.3
     
    301326
    302327/**
    303  * Returns the options array for Twenty Eleven.
     328 * Return the options array for Twenty Eleven.
    304329 *
    305330 * @since Twenty Eleven 1.2
     
    325350
    326351/**
    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.
    328355 *
    329356 * @see twentyeleven_theme_options_init()
     
    331358 *
    332359 * @since Twenty Eleven 1.0
     360 *
     361 * @param array $input An array of form input.
    333362 */
    334363function twentyeleven_theme_options_validate( $input ) {
     
    350379        $output['theme_layout'] = $input['theme_layout'];
    351380
     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     */
    352390    return apply_filters( 'twentyeleven_theme_options_validate', $output, $input, $defaults );
    353391}
     
    365403        wp_enqueue_style( 'dark', get_template_directory_uri() . '/colors/dark.css', array(), null );
    366404
     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     */
    367412    do_action( 'twentyeleven_enqueue_color_scheme', $color_scheme );
    368413}
     
    418463
    419464/**
    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.
    423470 */
    424471function twentyeleven_layout_classes( $existing_classes ) {
     
    438485        $classes[] = $current_layout;
    439486
     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     */
    440495    $classes = apply_filters( 'twentyeleven_layout_classes', $classes, $current_layout );
    441496
     
    447502 * Implements Twenty Eleven theme options into Theme Customizer
    448503 *
    449  * @param $wp_customize Theme Customizer object
     504 * @since Twenty Eleven 1.3
     505 *
     506 * @param object $wp_customize Theme Customizer object.
    450507 * @return void
    451508 *
    452  * @since Twenty Eleven 1.3
    453509 */
    454510function twentyeleven_customize_register( $wp_customize ) {
     
    522578/**
    523579 * Bind JS handlers to make Theme Customizer preview reload changes asynchronously.
     580 *
    524581 * Used with blogname and blogdescription.
    525582 *
  • trunk/src/wp-content/themes/twentyeleven/inc/widgets.php

    r24131 r25625  
    11<?php
    22/**
    3  * Makes a custom Widget for displaying Aside, Link, Status, and Quote Posts available with Twenty Eleven
     3 * Widget For displaying post format posts
    44 *
    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
    68 *
    79 * @package WordPress
     
    1315    /**
    1416     * Constructor
     17     *
     18     * @since Twenty Eleven 1.0
    1519     *
    1620     * @return void
     
    2933     * Outputs the HTML for this widget.
    3034     *
    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
    3440     **/
    3541    function widget( $args, $instance ) {
     
    5056        extract( $args, EXTR_SKIP );
    5157
     58        //duplicate_hook
    5259        $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Ephemera', 'twentyeleven' ) : $instance['title'], $instance, $this->id_base);
    5360
     
    121128
    122129    /**
     130     * Update widget settings.
     131     *
    123132     * Deals with the settings when they are saved by the admin. Here is
    124133     * where any validation should be dealt with.
     134     *
     135     * @since Twenty Eleven 1.0
    125136     **/
    126137    function update( $new_instance, $old_instance ) {
     
    137148    }
    138149
     150    /**
     151     * Flush widget cache.
     152     *
     153     * @since Twenty Eleven 1.0
     154     */
    139155    function flush_widget_cache() {
    140156        wp_cache_delete( 'widget_twentyeleven_ephemera', 'widget' );
     
    142158
    143159    /**
     160     * Set up the widget form.
     161     *
    144162     * Displays the form for this widget on the Widgets page of the WP Admin area.
     163     *
     164     * @since Twenty Eleven 1.0
    145165     **/
    146166    function form( $instance ) {
  • trunk/src/wp-content/themes/twentyeleven/index.php

    r18291 r25625  
    11<?php
    22/**
    3  * The main template file.
     3 * Main template file
    44 *
    55 * This is the most generic template file in a WordPress theme
  • trunk/src/wp-content/themes/twentyeleven/page.php

    r19379 r25625  
    11<?php
    22/**
    3  * The template for displaying all pages.
     3 * Template for displaying all pages
    44 *
    55 * This is the template that displays all pages by default.
  • trunk/src/wp-content/themes/twentyeleven/search.php

    r17959 r25625  
    11<?php
    22/**
    3  * The template for displaying Search Results pages.
     3 * Template for displaying Search Results pages
    44 *
    55 * @package WordPress
     
    2525
    2626                    <?php
    27                         /* Include the Post-Format-specific template for the content.
     27                        /**
     28                         * Include the Post-Format-specific template for the content.
    2829                         * 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.
    3032                         */
    3133                        get_template_part( 'content', get_post_format() );
  • trunk/src/wp-content/themes/twentyeleven/searchform.php

    r18276 r25625  
    11<?php
    22/**
    3  * The template for displaying search forms in Twenty Eleven
     3 * Template for displaying search forms in Twenty Eleven
    44 *
    55 * @package WordPress
  • trunk/src/wp-content/themes/twentyeleven/showcase.php

    r24131 r25625  
    22/**
    33 * 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.
    56 *
    67 * 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  
    11<?php
    22/**
    3  * The Footer widget areas.
     3 * Footer widget areas
    44 *
    55 * @package WordPress
     
    1010
    1111<?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
    1314     * have widgets. So let's check that first.
    1415     *
  • trunk/src/wp-content/themes/twentyeleven/sidebar-page.php

    r19379 r25625  
    22/**
    33 * 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.
    56 *
    67 * @package WordPress
  • trunk/src/wp-content/themes/twentyeleven/sidebar.php

    r18335 r25625  
    11<?php
    22/**
    3  * The Sidebar containing the main widget area.
     3 * Sidebar containing the main widget area
    44 *
    55 * @package WordPress
  • trunk/src/wp-content/themes/twentyeleven/single.php

    r21491 r25625  
    11<?php
    22/**
    3  * The Template for displaying all single posts.
     3 * Template for displaying all single posts
    44 *
    55 * @package WordPress
  • trunk/src/wp-content/themes/twentyeleven/tag.php

    r18291 r25625  
    11<?php
    22/**
    3  * The template used to display Tag Archive pages
     3 * Template used to display Tag Archive pages
    44 *
    55 * @package WordPress
     
    2222                    <?php
    2323                        $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                             */
    2532                            echo apply_filters( 'tag_archive_meta', '<div class="tag-archive-meta">' . $tag_description . '</div>' );
     33                        }
    2634                    ?>
    2735                </header>
     
    3341
    3442                    <?php
    35                         /* Include the Post-Format-specific template for the content.
     43                        /**
     44                         * Include the Post-Format-specific template for the content.
    3645                         * 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.
    3848                         */
    3949                        get_template_part( 'content', get_post_format() );
Note: See TracChangeset for help on using the changeset viewer.