Make WordPress Core


Ignore:
Timestamp:
11/19/2014 08:27:09 PM (12 years ago)
Author:
iandstewart
Message:

Twenty Fifteen: doc cleanup, addresses removing periods from file header summaries, some spacing, loop documentation, and https instead of http.

Props DrewAPicture, MikeHansenMe, see #30149.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfifteen/index.php

    r30316 r30394  
    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
    … …  
    77 * It is used to display a page when nothing more specific matches a query.
    88 * e.g., it puts together the home page when no home.php file exists.
    9  * Learn more: http://codex.wordpress.org/Template_Hierarchy
    109 *
    11  * @link http://codex.wordpress.org/Template_Hierarchy
     10 * Learn more: {@link https://codex.wordpress.org/Template_Hierarchy}
    1211 *
    1312 * @package WordPress
    … …  
    2928                        <?php endif; ?>
    3029
    31                         <?php while ( have_posts() ) : the_post(); ?>
     30                        <?php
     31                        // Start the loop.
     32                        while ( have_posts() ) : the_post();
    3233
    33                                 <?php
    34                                         /* Include the Post-Format-specific template for the content.
    35                                          * If you want to override this in a child theme, then include a file
    36                                          * called content-___.php (where ___ is the Post Format name) and that will be used instead.
    37                                          */
    38                                         get_template_part( 'content', get_post_format() );
    39                                 ?>
     34                                /*
     35                                 * Include the Post-Format-specific template for the content.
     36                                 * If you want to override 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.
     38                                 */
     39                                get_template_part( 'content', get_post_format() );
    4040
    41                         <?php endwhile; ?>
     41                        // End the loop.
     42                        endwhile;
    4243
    43                         <?php
    44                                 the_pagination( array(
    45                                         'prev_text'          => __( 'Previous page', 'twentyfifteen' ),
    46                                         'next_text'          => __( 'Next page', 'twentyfifteen' ),
    47                                         'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
    48                                 ) );
    49                         ?>
     44                        // Previous/next page navigation.
     45                        the_pagination( array(
     46                                'prev_text'          => __( 'Previous page', 'twentyfifteen' ),
     47                                'next_text'          => __( 'Next page', 'twentyfifteen' ),
     48                                'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
     49                        ) );
    5050
    51                 <?php else : ?>
     51                // If no content, include the "No posts found" template.
     52                else :
     53                        get_template_part( 'content', 'none' );
    5254
    53                         <?php get_template_part( 'content', 'none' ); ?>
    54 
    55                 <?php endif; ?>
     55                endif;
     56                ?>
    5657
    5758                </main><!-- .site-main -->
Note: See TracChangeset for help on using the changeset viewer.