Default themes: Don't use /** docblocks for simple multiline comments.

props DrewAPicture, ericlewis.
fixes #25256.

Built from https://develop.svn.wordpress.org/trunk@25746


git-svn-id: http://core.svn.wordpress.org/trunk@25659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-10-09 20:39:09 +00:00
parent 7b27a47e85
commit f5eb32ec6b
37 changed files with 85 additions and 97 deletions

View File

@ -15,7 +15,7 @@ get_header(); ?>
<?php if ( have_posts() ) : ?>
<?php
/**
/*
* Queue the first post, that way we know what author
* we're dealing with (if that is the case).
*
@ -30,7 +30,7 @@ get_header(); ?>
</header>
<?php
/**
/*
* Since we called the_post() above, we need to
* rewind the loop back to the beginning that way
* we can run the loop properly, in full.
@ -67,7 +67,7 @@ get_header(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
/**
/*
* Include the Post-Format-specific template for the content.
* If you want to overload this in a child theme then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.

View File

@ -40,7 +40,7 @@ get_header(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
/**
/*
* Include the Post-Format-specific template for the content.
* If you want to overload this in a child theme then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.

View File

@ -17,7 +17,7 @@
<p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyeleven' ); ?></p>
</div><!-- #comments -->
<?php
/**
/*
* Stop the rest of comments.php from being processed,
* but don't kill the script entirely -- we still have
* to fully load the template.
@ -46,7 +46,7 @@
<ol class="commentlist">
<?php
/**
/*
* Loop through and list the comments. Tell wp_list_comments()
* to use twentyeleven_comment() to format the comments.
* If you want to overload this in a child theme then you can
@ -66,7 +66,7 @@
<?php endif; // check for comment navigation ?>
<?php
/**
/*
* If there are no comments and comments are closed, let's leave a little note, shall we?
* But we only want the note on posts and pages that had comments in the first place.
*/

View File

@ -15,7 +15,7 @@
<footer id="colophon" role="contentinfo">
<?php
/**
/*
* A sidebar in the footer? Yep. You can can customize
* your footer with three columns of widgets.
*/

View File

@ -38,13 +38,11 @@
* @since Twenty Eleven 1.0
*/
/**
* Set the content width based on the theme's design and stylesheet.
*/
// Set the content width based on the theme's design and stylesheet.
if ( ! isset( $content_width ) )
$content_width = 584;
/**
/*
* Tell WordPress to run twentyeleven_setup() when the 'after_setup_theme' hook is run.
*/
add_action( 'after_setup_theme', 'twentyeleven_setup' );
@ -72,7 +70,7 @@ if ( ! function_exists( 'twentyeleven_setup' ) ):
*/
function twentyeleven_setup() {
/**
/*
* Make Twenty Eleven available for translation.
* Translations can be added to the /languages/ directory.
* If you're building a theme based on Twenty Eleven, use
@ -107,7 +105,7 @@ function twentyeleven_setup() {
// Add support for custom backgrounds.
add_theme_support( 'custom-background', array(
/**
/*
* Let WordPress know what our default background color is.
* This is dependent on our current color scheme.
*/
@ -162,14 +160,14 @@ function twentyeleven_setup() {
add_custom_background();
}
/**
/*
* We'll be using post thumbnails for custom header images on posts and pages.
* We want them to be the size of the header image that we just defined.
* Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php.
*/
set_post_thumbnail_size( $custom_header_support['width'], $custom_header_support['height'], true );
/**
/*
* Add Twenty Eleven's custom image sizes.
* Used for large feature (header) images.
*/

View File

@ -25,9 +25,7 @@
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width" />
<title><?php
/**
* Print the <title> tag based on what is being viewed.
*/
// Print the <title> tag based on what is being viewed.
global $page, $paged;
wp_title( '|', true, 'right' );
@ -52,14 +50,14 @@
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
<![endif]-->
<?php
/**
/*
* We add some JavaScript to pages with the comment form
* to support sites with threaded comments (when in use).
*/
if ( is_singular() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
/**
/*
* Always have wp_head() just before the closing </head>
* tag of your theme, or you will break many plugins, which
* generally use this hook to add elements to <head> such
@ -83,7 +81,7 @@
if ( $header_image ) :
// Compatibility with versions of WordPress prior to 3.4.
if ( function_exists( 'get_custom_header' ) ) {
/**
/*
* We need to figure out what the minimum width should be for our featured image.
* This result would be the suggested width if the theme were to implement flexible widths.
*/
@ -94,7 +92,7 @@
?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
<?php
/**
/*
* The header image.
* Check if this is a post or page, if it has a thumbnail, and if it's a big one
*/

View File

@ -48,7 +48,7 @@ get_header(); ?>
<div class="entry-attachment">
<div class="attachment">
<?php
/**
/*
* Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery,
* or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file
*/

View File

@ -24,7 +24,7 @@ get_header(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
/**
/*
* Include the Post-Format-specific template for the content.
* If you want to overload this in a child theme then include a file
* called content-___.php (where ___ is the Post Format name) and that

View File

@ -26,7 +26,7 @@ get_header(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
/**
/*
* We are using a heading by rendering the_content
* If we have content for this page, let's display it.
*/
@ -37,7 +37,7 @@ get_header(); ?>
<?php endwhile; ?>
<?php
/**
/*
* Begin the featured posts section.
*
* See if we have any sticky posts and use them to create our featured posts.
@ -61,7 +61,7 @@ get_header(); ?>
// Proceed only if published posts exist
if ( $featured->have_posts() ) :
/**
/*
* We will need to count featured posts starting from zero
* to create the slider navigation.
*/
@ -84,7 +84,7 @@ get_header(); ?>
// Increase the counter.
$counter_slider++;
/**
/*
* We're going to add a class to our featured post for featured images
* by default it'll have the feature-text class.
*/
@ -108,7 +108,7 @@ get_header(); ?>
<section class="featured-post <?php echo $feature_class; ?>" id="featured-post-<?php echo $counter_slider; ?>">
<?php
/**
/*
* If the thumbnail is as big as the header image
* make it a large featured post, otherwise render it small
*/

View File

@ -9,7 +9,7 @@
?>
<?php
/**
/*
* The footer widget area is triggered if any of the areas
* have widgets. So let's check that first.
*

View File

@ -40,7 +40,7 @@ get_header(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
/**
/*
* Include the Post-Format-specific template for the content.
* If you want to overload this in a child theme then include a file
* called content-___.php (where ___ is the Post Format name) and that

View File

@ -18,7 +18,7 @@ get_header(); ?>
<div id="content" role="main">
<?php
/**
/*
* Queue the first post, that way we know
* what date we're dealing with (if that is the case).
*
@ -42,14 +42,14 @@ get_header(); ?>
</h1>
<?php
/**
/*
* Since we called the_post() above, we need to
* rewind the loop back to the beginning that way
* we can run the loop properly, in full.
*/
rewind_posts();
/**
/*
* Run the loop for the archives page to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-archive.php and that will be used instead.

View File

@ -13,7 +13,7 @@ get_header(); ?>
<div id="content" role="main">
<?php
/**
/*
* Run the loop to output the attachment.
* If you want to overload this in a child theme then include a file
* called loop-attachment.php and that will be used instead.

View File

@ -13,7 +13,7 @@ get_header(); ?>
<div id="content" role="main">
<?php
/**
/*
* Queue the first post, that way we know who
* the author is when we try to get their name,
* URL, description, avatar, etc.
@ -51,14 +51,14 @@ if ( get_the_author_meta( 'description' ) ) : ?>
<?php endif; ?>
<?php
/**
/*
* Since we called the_post() above, we need to
* rewind the loop back to the beginning that way
* we can run the loop properly, in full.
*/
rewind_posts();
/**
/*
* Run the loop for the author archive page to output the authors posts
* If you want to overload this in a child theme then include a file
* called loop-author.php and that will be used instead.

View File

@ -20,7 +20,7 @@ get_header(); ?>
if ( ! empty( $category_description ) )
echo '<div class="archive-meta">' . $category_description . '</div>';
/**
/*
* Run the loop for the category page to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-category.php and that will be used instead.

View File

@ -18,7 +18,7 @@
<p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyten' ); ?></p>
</div><!-- #comments -->
<?php
/**
/*
* Stop the rest of comments.php from being processed,
* but don't kill the script entirely -- we still have
* to fully load the template.
@ -46,7 +46,7 @@
<ol class="commentlist">
<?php
/**
/*
* Loop through and list the comments. Tell wp_list_comments()
* to use twentyten_comment() to format the comments.
* If you want to overload this in a child theme then you can
@ -65,7 +65,7 @@
<?php endif; // check for comment navigation ?>
<?php
/**
/*
* If there are no comments and comments are closed, let's leave a little note, shall we?
* But we only want the note on posts and pages that had comments in the first place.
*/

View File

@ -16,7 +16,7 @@
<div id="colophon">
<?php
/**
/*
* A sidebar in the footer? Yep. You can can customize
* your footer with four columns of widgets.
*/
@ -46,7 +46,7 @@
</div><!-- #wrapper -->
<?php
/**
/*
* Always have wp_footer() just before the closing </body>
* tag of your theme, or you will break many plugins, which
* generally use this hook to reference JavaScript files.

View File

@ -38,7 +38,7 @@
* @since Twenty Ten 1.0
*/
/**
/*
* Set the content width based on the theme's design and stylesheet.
*
* Used to set the width of images and content. Should be equal to the width the theme
@ -47,7 +47,7 @@
if ( ! isset( $content_width ) )
$content_width = 640;
/** Tell WordPress to run twentyten_setup() when the 'after_setup_theme' hook is run. */
/* Tell WordPress to run twentyten_setup() when the 'after_setup_theme' hook is run. */
add_action( 'after_setup_theme', 'twentyten_setup' );
if ( ! function_exists( 'twentyten_setup' ) ):
@ -84,7 +84,7 @@ function twentyten_setup() {
// Add default posts and comments RSS feed links to head
add_theme_support( 'automatic-feed-links' );
/**
/*
* Make theme available for translation.
* Translations can be filed in the /languages/ directory
*/
@ -104,7 +104,7 @@ function twentyten_setup() {
// The custom header business starts here.
$custom_header_support = array(
/**
/*
* The default image to use.
* The %s is a placeholder for the theme template directory URI.
*/
@ -147,7 +147,7 @@ function twentyten_setup() {
add_custom_background();
}
/**
/*
* We'll be using post thumbnails for custom header images on posts and pages.
* We want them to be 940 pixels wide by 198 pixels tall.
* Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php.

View File

@ -37,14 +37,14 @@
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php
/**
/*
* We add some JavaScript to pages with the comment form
* to support sites with threaded comments (when in use).
*/
if ( is_singular() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
/**
/*
* Always have wp_head() just before the closing </head>
* tag of your theme, or you will break many plugins, which
* generally use this hook to add elements to <head> such
@ -70,7 +70,7 @@
<?php
// Compatibility with versions of WordPress prior to 3.4.
if ( function_exists( 'get_custom_header' ) ) {
/**
/*
* We need to figure out what the minimum width should be for our featured image.
* This result would be the suggested width if the theme were to implement flexible widths.
*/

View File

@ -19,7 +19,7 @@ get_header(); ?>
<div id="content" role="main">
<?php
/**
/*
* Run the loop to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-index.php and that will be used instead.

View File

@ -39,7 +39,7 @@
<?php endif; ?>
<?php
/**
/*
* Start the Loop.
*
* In Twenty Ten we use the same loop in multiple contexts.

View File

@ -18,7 +18,7 @@ get_header(); ?>
<div id="content" role="main">
<?php
/**
/*
* Run the loop to output the page.
* If you want to overload this in a child theme then include a file
* called loop-page.php and that will be used instead.

View File

@ -18,7 +18,7 @@ get_header(); ?>
<div id="content" role="main">
<?php
/**
/*
* Run the loop to output the page.
* If you want to overload this in a child theme then include a file
* called loop-page.php and that will be used instead.

View File

@ -15,7 +15,7 @@ get_header(); ?>
<?php if ( have_posts() ) : ?>
<h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentyten' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
<?php
/**
/*
* Run the loop for the search to output the results.
* If you want to overload this in a child theme then include a file
* called loop-search.php and that will be used instead.

View File

@ -9,7 +9,7 @@
?>
<?php
/**
/*
* The footer widget area is triggered if any of the areas
* have widgets. So let's check that first.
*

View File

@ -12,7 +12,7 @@
<ul class="xoxo">
<?php
/**
/*
* When we call the dynamic_sidebar() function, it'll spit out
* the widgets for that widget area. If it instead returns false,
* then the sidebar simply doesn't exist, so we'll hard-code in

View File

@ -13,7 +13,7 @@ get_header(); ?>
<div id="content" role="main">
<?php
/**
/*
* Run the loop to output the post.
* If you want to overload this in a child theme then include a file
* called loop-single.php and that will be used instead.

View File

@ -17,7 +17,7 @@ get_header(); ?>
?></h1>
<?php
/**
/*
* Run the loop for the tag archive to output the posts
* If you want to overload this in a child theme then include a file
* called loop-tag.php and that will be used instead.

View File

@ -17,7 +17,7 @@ get_header(); ?>
<?php if ( have_posts() ) : ?>
<?php
/**
/*
* Queue the first post, that way we know what author
* we're dealing with (if that is the case).
*
@ -32,7 +32,7 @@ get_header(); ?>
</header><!-- .archive-header -->
<?php
/**
/*
* Since we called the_post() above, we need to
* rewind the loop back to the beginning that way
* we can run the loop properly, in full.

View File

@ -9,7 +9,7 @@
* @since Twenty Thirteen 1.0
*/
/**
/*
* If the current post is protected by a password and the visitor has not yet
* entered the password we will return early without loading the comments.
*/

View File

@ -23,7 +23,7 @@
* @since Twenty Thirteen 1.0
*/
/**
/*
* Set up the content width value based on the theme's design.
*
* @see twentythirteen_content_width() for template-specific adjustments.
@ -60,7 +60,7 @@ if ( version_compare( $GLOBALS['wp_version'], '3.6-alpha', '<' ) )
* @return void
*/
function twentythirteen_setup() {
/**
/*
* Makes Twenty Thirteen available for translation.
*
* Translations can be added to the /languages/ directory.
@ -70,7 +70,7 @@ function twentythirteen_setup() {
*/
load_theme_textdomain( 'twentythirteen', get_template_directory() . '/languages' );
/**
/*
* This theme styles the visual editor to resemble the theme style,
* specifically font, colors, icons, and column width.
*/
@ -79,13 +79,13 @@ function twentythirteen_setup() {
// Adds RSS feed links to <head> for posts and comments.
add_theme_support( 'automatic-feed-links' );
/**
/*
* Switches default core markup for search form, comment form,
* and comments to output valid HTML5.
*/
add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list' ) );
/**
/*
* This theme supports all available post formats by default.
* See http://codex.wordpress.org/Post_Formats
*/
@ -96,7 +96,7 @@ function twentythirteen_setup() {
// This theme uses wp_nav_menu() in one location.
register_nav_menu( 'primary', __( 'Navigation Menu', 'twentythirteen' ) );
/**
/*
* This theme uses a custom image size for featured images, displayed on
* "standard" posts and pages.
*/
@ -121,14 +121,14 @@ add_action( 'after_setup_theme', 'twentythirteen_setup' );
function twentythirteen_fonts_url() {
$fonts_url = '';
/**
/*
* Translators: If there are characters in your language that are not
* supported by Source Sans Pro, translate this to 'off'. Do not translate
* into your own language.
*/
$source_sans_pro = _x( 'on', 'Source Sans Pro font: on or off', 'twentythirteen' );
/**
/*
* Translators: If there are characters in your language that are not
* supported by Bitter, translate this to 'off'. Do not translate into your
* own language.
@ -162,7 +162,7 @@ function twentythirteen_fonts_url() {
* @return void
*/
function twentythirteen_scripts_styles() {
/**
/*
* Adds JavaScript to pages with the comment form to support
* sites with threaded comments (when in use).
*/
@ -413,7 +413,7 @@ function twentythirteen_the_attached_image() {
$next_attachment_url = wp_get_attachment_url();
$post = get_post();
/**
/*
* Grab the IDs of all the image attachments in a gallery so we can get the URL
* of the next adjacent image in a gallery, or the first image (if we're
* looking at the last image in a gallery), or, in a gallery of one, just the

View File

@ -40,7 +40,7 @@ function twentythirteen_custom_header_setup() {
add_theme_support( 'custom-header', $args );
/**
/*
* Default custom headers packaged with the theme.
* %s is a placeholder for the theme template directory URI.
*/

View File

@ -12,7 +12,7 @@
* @since Twenty Twelve 1.0
*/
/**
/*
* If the current post is protected by a password and
* the visitor has not yet entered the password we will
* return early without loading the comments.

View File

@ -22,9 +22,7 @@
* @since Twenty Twelve 1.0
*/
/**
* Set up the content width value based on the theme's design and stylesheet.
*/
// Set up the content width value based on the theme's design and stylesheet.
if ( ! isset( $content_width ) )
$content_width = 625;
@ -44,7 +42,7 @@ if ( ! isset( $content_width ) )
* @since Twenty Twelve 1.0
*/
function twentytwelve_setup() {
/**
/*
* Makes Twenty Twelve available for translation.
*
* Translations can be added to the /languages/ directory.
@ -65,7 +63,7 @@ function twentytwelve_setup() {
// This theme uses wp_nav_menu() in one location.
register_nav_menu( 'primary', __( 'Primary Menu', 'twentytwelve' ) );
/**
/*
* This theme supports custom background color and image,
* and here we also set up the default background color.
*/
@ -97,14 +95,14 @@ require( get_template_directory() . '/inc/custom-header.php' );
function twentytwelve_get_font_url() {
$font_url = '';
/**
/*
* translators: If there are characters in your language that are not supported
* by Open Sans, translate this to 'off'. Do not translate into your own language.
*/
if ( 'off' !== _x( 'on', 'Open Sans font: on or off', 'twentytwelve' ) ) {
$subsets = 'latin,latin-ext';
/**
/*
* translators: To add an additional Open Sans character subset specific to your language,
* translate this to 'greek', 'cyrillic' or 'vietnamese'. Do not translate into your own language.
*/
@ -138,30 +136,24 @@ function twentytwelve_get_font_url() {
function twentytwelve_scripts_styles() {
global $wp_styles;
/**
/*
* Adds JavaScript to pages with the comment form to support
* sites with threaded comments (when in use).
*/
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
/**
* Adds JavaScript for handling the navigation menu hide-and-show behavior.
*/
// Adds JavaScript for handling the navigation menu hide-and-show behavior.
wp_enqueue_script( 'twentytwelve-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '1.0', true );
$font_url = twentytwelve_get_font_url();
if ( ! empty( $font_url ) )
wp_enqueue_style( 'twentytwelve-fonts', esc_url_raw( $font_url ), array(), null );
/**
* Loads our main stylesheet.
*/
// Loads our main stylesheet.
wp_enqueue_style( 'twentytwelve-style', get_stylesheet_uri() );
/**
* Loads the Internet Explorer specific stylesheet.
*/
// Loads the Internet Explorer specific stylesheet.
wp_enqueue_style( 'twentytwelve-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentytwelve-style' ), '20121010' );
$wp_styles->add_data( 'twentytwelve-ie', 'conditional', 'lt IE 9' );
}

View File

@ -48,7 +48,7 @@ get_header(); ?>
<div class="entry-attachment">
<div class="attachment">
<?php
/**
/*
* Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery,
* or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file
*/

View File

@ -9,7 +9,7 @@
* @since Twenty Twelve 1.0
*/
/**
/*
* The front page widget area is triggered if any of the areas
* have widgets. So let's check that first.
*

View File

@ -29,7 +29,7 @@ get_header(); ?>
/* Start the Loop */
while ( have_posts() ) : the_post();
/**
/*
* Include the post format-specific template for the content. If you want to
* this in a child theme then include a file called called content-___.php
* (where ___ is the post format) and that will be used instead.