Make WordPress Core

Changeset 25522


Ignore:
Timestamp:
09/20/2013 07:33:23 PM (11 years ago)
Author:
lancewillett
Message:

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

Location:
trunk/src/wp-content/themes/twentythirteen
Files:
31 edited

Legend:

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

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

    r23680 r25522  
    11<?php
    22/**
    3  * The template for displaying Archive pages.
     3 * The template for displaying Archive pages
    44 *
    55 * Used to display archive-type pages if nothing more specific matches a query.
     
    1111 * and author.php for Author archives.
    1212 *
    13  * Learn more: http://codex.wordpress.org/Template_Hierarchy
     13 * @link http://codex.wordpress.org/Template_Hierarchy
    1414 *
    1515 * @package WordPress
  • trunk/src/wp-content/themes/twentythirteen/author-bio.php

    r24073 r25522  
    11<?php
    22/**
    3  * The template for displaying Author bios.
     3 * The template for displaying Author bios
    44 *
    55 * @package WordPress
     
    1111<div class="author-info">
    1212    <div class="author-avatar">
    13         <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentythirteen_author_bio_avatar_size', 74 ) ); ?>
     13        <?php
     14        /**
     15         * Filter the author bio avatar size.
     16         *
     17         * @since Twenty Thirteen 1.0
     18         *
     19         * @param int $size The avatar height and width size in pixels.
     20         */
     21        $author_bio_avatar_size = apply_filters( 'twentythirteen_author_bio_avatar_size', 74 );
     22        echo get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size );
     23        ?>
    1424    </div><!-- .author-avatar -->
    1525    <div class="author-description">
  • trunk/src/wp-content/themes/twentythirteen/author.php

    r23680 r25522  
    11<?php
    22/**
    3  * The template for displaying Author archive pages.
     3 * The template for displaying Author archive pages
    44 *
    5  * Learn more: http://codex.wordpress.org/Template_Hierarchy
     5 * @link http://codex.wordpress.org/Template_Hierarchy
    66 *
    77 * @package WordPress
     
    1818
    1919            <?php
    20                 /* Queue the first post, that way we know
    21                  * what author we're dealing with (if that is the case).
     20                /**
     21                 * Queue the first post, that way we know what author
     22                 * we're dealing with (if that is the case).
    2223                 *
    2324                 * We reset this later so we can run the loop
     
    3233
    3334            <?php
    34                 /* Since we called the_post() above, we need to
     35                /**
     36                 * Since we called the_post() above, we need to
    3537                 * rewind the loop back to the beginning that way
    3638                 * we can run the loop properly, in full.
  • trunk/src/wp-content/themes/twentythirteen/category.php

    r23680 r25522  
    11<?php
    22/**
    3  * The template for displaying Category pages.
     3 * The template for displaying Category pages
    44 *
    5  * Learn more: http://codex.wordpress.org/Template_Hierarchy
     5 * @link http://codex.wordpress.org/Template_Hierarchy
    66 *
    77 * @package WordPress
  • trunk/src/wp-content/themes/twentythirteen/comments.php

    r24423 r25522  
    11<?php
    22/**
    3  * The template for displaying Comments.
     3 * The template for displaying Comments
    44 *
    55 * The area of the page that contains comments and the comment form.
     
    1010 */
    1111
    12 /*
     12/**
    1313 * If the current post is protected by a password and the visitor has not yet
    1414 * entered the password we will return early without loading the comments.
  • trunk/src/wp-content/themes/twentythirteen/content-aside.php

    r24071 r25522  
    11<?php
    22/**
    3  * The template for displaying posts in the Aside post format.
     3 * The template for displaying posts in the Aside post format
    44 *
    55 * @package WordPress
  • trunk/src/wp-content/themes/twentythirteen/content-audio.php

    r24391 r25522  
    11<?php
    22/**
    3  * The template for displaying posts in the Audio post format.
     3 * The template for displaying posts in the Audio post format
    44 *
    55 * @package WordPress
  • trunk/src/wp-content/themes/twentythirteen/content-chat.php

    r24391 r25522  
    11<?php
    22/**
    3  * The template for displaying posts in the Chat post format.
     3 * The template for displaying posts in the Chat post format
    44 *
    55 * @package WordPress
  • trunk/src/wp-content/themes/twentythirteen/content-gallery.php

    r24391 r25522  
    11<?php
    22/**
    3  * The template for displaying posts in the Gallery post format.
     3 * The template for displaying posts in the Gallery post format
    44 *
    55 * @package WordPress
  • trunk/src/wp-content/themes/twentythirteen/content-image.php

    r24391 r25522  
    11<?php
    22/**
    3  * The template for displaying posts in the Image post format.
     3 * The template for displaying posts in the Image post format
    44 *
    55 * @package WordPress
  • trunk/src/wp-content/themes/twentythirteen/content-link.php

    r24131 r25522  
    11<?php
    22/**
    3  * The template for displaying posts in the Link post format.
     3 * The template for displaying posts in the Link post format
    44 *
    55 * @package WordPress
  • trunk/src/wp-content/themes/twentythirteen/content-none.php

    r23799 r25522  
    11<?php
    22/**
    3  * The template for displaying a "No posts found" message.
     3 * The template for displaying a "No posts found" message
    44 *
    55 * @package WordPress
  • trunk/src/wp-content/themes/twentythirteen/content-quote.php

    r24167 r25522  
    11<?php
    22/**
    3  * The template for displaying posts in the Quote post format.
     3 * The template for displaying posts in the Quote post format
    44 *
    55 * @package WordPress
  • trunk/src/wp-content/themes/twentythirteen/content-status.php

    r23680 r25522  
    11<?php
    22/**
    3  * The template for displaying posts in the Status post format.
     3 * The template for displaying posts in the Status post format
    44 *
    55 * @package WordPress
  • trunk/src/wp-content/themes/twentythirteen/content-video.php

    r24391 r25522  
    11<?php
    22/**
    3  * The template for displaying posts in the Video post format.
     3 * The template for displaying posts in the Video post format
    44 *
    55 * @package WordPress
  • trunk/src/wp-content/themes/twentythirteen/content.php

    r24131 r25522  
    11<?php
    22/**
    3  * The default template for displaying content. Used for both single and index/archive/search.
     3 * The default template for displaying content
     4 *
     5 * Used for both single and index/archive/search.
    46 *
    57 * @package WordPress
  • trunk/src/wp-content/themes/twentythirteen/footer.php

    r23680 r25522  
    11<?php
    22/**
    3  * The template for displaying the footer.
     3 * The template for displaying the footer
    44 *
    5  * Contains footer content and the closing of the
    6  * #main and #page div elements.
     5 * Contains footer content and the closing of the #main and #page div elements.
    76 *
    87 * @package WordPress
  • trunk/src/wp-content/themes/twentythirteen/functions.php

    r24934 r25522  
    11<?php
    22/**
    3  * Twenty Thirteen functions and definitions.
     3 * Twenty Thirteen functions and definitions
    44 *
    55 * Sets up the theme and provides some helper functions, which are used in the
     
    1717 * instead attached to a filter or action hook.
    1818 *
    19  * For more information on hooks, actions, and filters,
    20  * see http://codex.wordpress.org/Plugin_API
     19 * For more information on hooks, actions, and filters, @link http://codex.wordpress.org/Plugin_API
    2120 *
    2221 * @package WordPress
     
    2625
    2726/**
    28  * Sets up the content width value based on the theme's design.
     27 * Set up the content width value based on the theme's design.
     28 *
    2929 * @see twentythirteen_content_width() for template-specific adjustments.
    3030 */
     
    3333
    3434/**
    35  * Adds support for a custom header image.
     35 * Add support for a custom header image.
    3636 */
    3737require get_template_directory() . '/inc/custom-header.php';
     
    4444
    4545/**
     46 * Twenty Thirteen setup.
     47 *
    4648 * Sets up theme defaults and registers the various WordPress features that
    4749 * Twenty Thirteen supports.
     
    5961 */
    6062function twentythirteen_setup() {
    61     /*
     63    /**
    6264     * Makes Twenty Thirteen available for translation.
    6365     *
     
    6971    load_theme_textdomain( 'twentythirteen', get_template_directory() . '/languages' );
    7072
    71     /*
     73    /**
    7274     * This theme styles the visual editor to resemble the theme style,
    7375     * specifically font, colors, icons, and column width.
     
    7880    add_theme_support( 'automatic-feed-links' );
    7981
    80     // Switches default core markup for search form, comment form, and comments
    81     // to output valid HTML5.
     82    /**
     83     * Switches default core markup for search form, comment form,
     84     * and comments to output valid HTML5.
     85     */
    8286    add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list' ) );
    8387
    84     /*
     88    /**
    8589     * This theme supports all available post formats by default.
    8690     * See http://codex.wordpress.org/Post_Formats
     
    9397    register_nav_menu( 'primary', __( 'Navigation Menu', 'twentythirteen' ) );
    9498
    95     /*
     99    /**
    96100     * This theme uses a custom image size for featured images, displayed on
    97101     * "standard" posts and pages.
     
    106110
    107111/**
    108  * Returns the Google font stylesheet URL, if available.
     112 * Return the Google font stylesheet URL, if available.
    109113 *
    110114 * The use of Source Sans Pro and Bitter by default is localized. For languages
     
    118122    $fonts_url = '';
    119123
    120     /* Translators: If there are characters in your language that are not
     124    /**
     125     * Translators: If there are characters in your language that are not
    121126     * supported by Source Sans Pro, translate this to 'off'. Do not translate
    122127     * into your own language.
     
    124129    $source_sans_pro = _x( 'on', 'Source Sans Pro font: on or off', 'twentythirteen' );
    125130
    126     /* Translators: If there are characters in your language that are not
     131    /**
     132     * Translators: If there are characters in your language that are not
    127133     * supported by Bitter, translate this to 'off'. Do not translate into your
    128134     * own language.
     
    150156
    151157/**
    152  * Enqueues scripts and styles for front end.
     158 * Enqueue scripts and styles for the front end.
    153159 *
    154160 * @since Twenty Thirteen 1.0
     
    157163 */
    158164function twentythirteen_scripts_styles() {
    159     // Adds JavaScript to pages with the comment form to support sites with
    160     // threaded comments (when in use).
     165    /**
     166     * Adds JavaScript to pages with the comment form to support
     167     * sites with threaded comments (when in use).
     168     */
    161169    if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
    162170        wp_enqueue_script( 'comment-reply' );
     
    185193
    186194/**
     195 * Filter the page title.
     196 *
    187197 * Creates a nicely formatted and more specific title element text for output
    188198 * in head of document, based on current view.
     
    191201 *
    192202 * @param string $title Default title text for current view.
    193  * @param string $sep Optional separator.
     203 * @param string $sep   Optional separator.
    194204 * @return string The filtered title.
    195205 */
     
    217227
    218228/**
    219  * Registers two widget areas.
     229 * Register two widget areas.
    220230 *
    221231 * @since Twenty Thirteen 1.0
     
    248258if ( ! function_exists( 'twentythirteen_paging_nav' ) ) :
    249259/**
    250  * Displays navigation to next/previous set of posts when applicable.
     260 * Display navigation to next/previous set of posts when applicable.
    251261 *
    252262 * @since Twenty Thirteen 1.0
     
    281291if ( ! function_exists( 'twentythirteen_post_nav' ) ) :
    282292/**
    283  * Displays navigation to next/previous post when applicable.
     293 * Display navigation to next/previous post when applicable.
    284294*
    285295* @since Twenty Thirteen 1.0
     
    312322if ( ! function_exists( 'twentythirteen_entry_meta' ) ) :
    313323/**
    314  * Prints HTML with meta information for current post: categories, tags, permalink, author, and date.
     324 * Print HTML with meta information for current post: categories, tags, permalink, author, and date.
    315325 *
    316326 * Create your own twentythirteen_entry_meta() to override in a child theme.
     
    352362if ( ! function_exists( 'twentythirteen_entry_date' ) ) :
    353363/**
    354  * Prints HTML with date information for current post.
     364 * Print HTML with date information for current post.
    355365 *
    356366 * Create your own twentythirteen_entry_date() to override in a child theme.
     
    358368 * @since Twenty Thirteen 1.0
    359369 *
    360  * @param boolean $echo Whether to echo the date. Default true.
     370 * @param boolean $echo (optional) Whether to echo the date. Default true.
    361371 * @return string The HTML-formatted post date.
    362372 */
     
    383393if ( ! function_exists( 'twentythirteen_the_attached_image' ) ) :
    384394/**
    385  * Prints the attached image with a link to the next attached image.
     395 * Print the attached image with a link to the next attached image.
    386396 *
    387397 * @since Twenty Thirteen 1.0
     
    390400 */
    391401function twentythirteen_the_attached_image() {
    392     $post                = get_post();
     402    /**
     403     * Filter the image attachment size to use.
     404     *
     405     * @since Twenty thirteen 1.0
     406     *
     407     * @param array $size {
     408     *     @type int The attachment height in pixels.
     409     *     @type int The attachment width in pixels.
     410     * }
     411     */
    393412    $attachment_size     = apply_filters( 'twentythirteen_attachment_size', array( 724, 724 ) );
    394413    $next_attachment_url = wp_get_attachment_url();
     414    $post                = get_post();
    395415
    396416    /**
     
    438458
    439459/**
    440  * Returns the URL from the post.
     460 * Return the post URL.
    441461 *
    442462 * @uses get_url_in_content() to get the URL in the post meta (if it exists) or
     
    457477
    458478/**
    459  * Extends the default WordPress body classes.
     479 * Extend the default WordPress body classes.
    460480 *
    461481 * Adds body classes to denote:
     
    484504
    485505/**
    486  * Adjusts content_width value for video post formats and attachment templates.
     506 * Adjust content_width value for video post formats and attachment templates.
    487507 *
    488508 * @since Twenty Thirteen 1.0
     
    516536
    517537/**
    518  * Binds JavaScript handlers to make Customizer preview reload changes
    519  * asynchronously.
    520  *
    521  * @since Twenty Thirteen 1.0
     538 * Enqueue Javascript postMessage handlers for the Customizer.
     539 *
     540 * Binds JavaScript handlers to make the Customizer preview
     541 * reload changes asynchronously.
     542 *
     543 * @since Twenty Thirteen 1.0
     544 *
     545 * @return void
    522546 */
    523547function twentythirteen_customize_preview_js() {
  • trunk/src/wp-content/themes/twentythirteen/header.php

    r24412 r25522  
    11<?php
    22/**
    3  * The Header for our theme.
     3 * The Header template for our theme
    44 *
    55 * Displays all of the <head> section and everything up till <div id="main">
  • trunk/src/wp-content/themes/twentythirteen/image.php

    r24402 r25522  
    11<?php
    22/**
    3  * The template for displaying image attachments.
     3 * The template for displaying image attachments
    44 *
    5  * Learn more: http://codex.wordpress.org/Template_Hierarchy
     5 * @link http://codex.wordpress.org/Template_Hierarchy
    66 *
    77 * @package WordPress
  • trunk/src/wp-content/themes/twentythirteen/inc/back-compat.php

    r24411 r25522  
    11<?php
    22/**
    3  * Twenty Thirteen back compat functionality.
     3 * Twenty Thirteen back compat functionality
    44 *
    55 * Prevents Twenty Thirteen from running on WordPress versions prior to 3.6,
    6  * since this theme is not meant to be backwards compatible and relies on
     6 * since this theme is not meant to be backward compatible and relies on
    77 * many new functions and markup changes introduced in 3.6.
    88 *
     
    1313
    1414/**
    15  * Prevent switching to Twenty Thirteen on old versions of WordPress. Switches
    16  * to the default theme.
     15 * Prevent switching to Twenty Thirteen on old versions of WordPress.
     16 *
     17 * Switches to the default theme.
    1718 *
    1819 * @since Twenty Thirteen 1.0
     
    2829
    2930/**
     31 * Add message for unsuccessful theme switch.
     32 *
    3033 * Prints an update nag after an unsuccessful attempt to switch to
    3134 * Twenty Thirteen on WordPress versions prior to 3.6.
     
    4144
    4245/**
    43  * Prevents the Customizer from being loaded on WordPress versions prior to 3.6.
     46 * Prevent the Theme Customizer from being loaded on WordPress versions prior to 3.6.
    4447 *
    4548 * @since Twenty Thirteen 1.0
     
    5558
    5659/**
    57  * Prevents the Theme Preview from being loaded on WordPress versions prior to 3.4.
     60 * Prevent the Theme Preview from being loaded on WordPress versions prior to 3.4.
    5861 *
    5962 * @since Twenty Thirteen 1.0
  • trunk/src/wp-content/themes/twentythirteen/inc/custom-header.php

    r25129 r25522  
    11<?php
    22/**
    3  * Implements a custom header for Twenty Thirteen.
    4  * See http://codex.wordpress.org/Custom_Headers
     3 * Implement a custom header for Twenty Thirteen
     4 *
     5 * @link http://codex.wordpress.org/Custom_Headers
    56 *
    67 * @package WordPress
     
    1011
    1112/**
    12  * Sets up the WordPress core custom header arguments and settings.
     13 * Set up the WordPress core custom header arguments and settings.
    1314 *
    1415 * @uses add_theme_support() to register support for 3.4 and up.
     
    1920 *
    2021 * @since Twenty Thirteen 1.0
     22 *
     23 * @return void
    2124 */
    2225function twentythirteen_custom_header_setup() {
     
    3841    add_theme_support( 'custom-header', $args );
    3942
    40     /*
     43    /**
    4144     * Default custom headers packaged with the theme.
    4245     * %s is a placeholder for the theme template directory URI.
     
    6366
    6467/**
    65  * Loads our special font CSS files.
    66  *
    67  * @since Twenty Thirteen 1.0
     68 * Load our special font CSS files.
     69 *
     70 * @since Twenty Thirteen 1.0
     71 *
     72 * @return void
    6873 */
    6974function twentythirteen_custom_header_fonts() {
     
    7782
    7883/**
    79  * Styles the header text displayed on the blog.
     84 * Style the header text displayed on the blog.
    8085 *
    8186 * get_header_textcolor() options: Hide text (returns 'blank'), or any hex value.
    8287 *
    8388 * @since Twenty Thirteen 1.0
     89 *
     90 * @return void
    8491 */
    8592function twentythirteen_header_style() {
     
    135142
    136143/**
    137  * Styles the header image displayed on the Appearance > Header admin panel.
    138  *
    139  * @since Twenty Thirteen 1.0
     144 * Style the header image displayed on the Appearance > Header admin panel.
     145 *
     146 * @since Twenty Thirteen 1.0
     147 *
     148 * @return void
    140149 */
    141150function twentythirteen_admin_header_style() {
     
    199208
    200209/**
    201  * Outputs markup to be displayed on the Appearance > Header admin panel.
     210 * Output markup to be displayed on the Appearance > Header admin panel.
     211 *
    202212 * This callback overrides the default markup displayed there.
    203213 *
    204214 * @since Twenty Thirteen 1.0
     215 *
     216 * @return void
    205217 */
    206218function twentythirteen_admin_header_image() {
  • trunk/src/wp-content/themes/twentythirteen/index.php

    r23680 r25522  
    11<?php
    22/**
    3  * The main template file.
     3 * The main template file
    44 *
    55 * This is the most generic template file in a WordPress theme and one of the
     
    88 * For example, it puts together the home page when no home.php file exists.
    99 *
    10  * Learn more: http://codex.wordpress.org/Template_Hierarchy
     10 * @link http://codex.wordpress.org/Template_Hierarchy
    1111 *
    1212 * @package WordPress
  • trunk/src/wp-content/themes/twentythirteen/page.php

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

    r23680 r25522  
    11<?php
    22/**
    3  * The template for displaying Search Results pages.
     3 * The template for displaying Search Results pages
    44 *
    55 * @package WordPress
  • trunk/src/wp-content/themes/twentythirteen/sidebar-main.php

    r23755 r25522  
    11<?php
    22/**
    3  * The sidebar containing the footer widget area.
     3 * The sidebar containing the footer widget area
    44 *
    5  * If no active widgets in this sidebar, it will be hidden completely.
     5 * If no active widgets in this sidebar, hide it completely.
    66 *
    77 * @package WordPress
  • trunk/src/wp-content/themes/twentythirteen/sidebar.php

    r23755 r25522  
    11<?php
    22/**
    3  * The sidebar containing the secondary widget area, displays on posts and pages.
     3 * The sidebar containing the secondary widget area
    44 *
    5  * If no active widgets in this sidebar, it will be hidden completely.
     5 * Displays on posts and pages.
     6 *
     7 * If no active widgets are in this sidebar, hide it completely.
    68 *
    79 * @package WordPress
  • trunk/src/wp-content/themes/twentythirteen/single.php

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

    r23680 r25522  
    11<?php
    22/**
    3  * The template for displaying Tag pages.
     3 * The template for displaying Tag pages
    44 *
    55 * Used to display archive-type pages for posts in a tag.
    66 *
    7  * Learn more: http://codex.wordpress.org/Template_Hierarchy
     7 * @link http://codex.wordpress.org/Template_Hierarchy
    88 *
    99 * @package WordPress
  • trunk/src/wp-content/themes/twentythirteen/taxonomy-post_format.php

    r23680 r25522  
    11<?php
    22/**
    3  * The template for displaying Post Format pages.
     3 * The template for displaying Post Format pages
    44 *
    55 * Used to display archive-type pages for posts with a post format.
     
    77 * new template file for each specific one.
    88 *
    9  * Learn more: http://codex.wordpress.org/Template_Hierarchy
     9 * @link http://codex.wordpress.org/Template_Hierarchy
    1010 *
    1111 * @package WordPress
Note: See TracChangeset for help on using the changeset viewer.