Make WordPress Core

Ticket #30149: 30149.4.diff

File 30149.4.diff, 30.0 KB (added by DrewAPicture, 10 years ago)
  • src/wp-content/themes/twentyfifteen/404.php

     
    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
    66 * @subpackage Twenty_Fifteen
     
    2727                </main><!-- .site-main -->
    2828        </div><!-- .content-area -->
    2929
    30 <?php get_footer(); ?>
    31  No newline at end of file
     30<?php get_footer(); ?>
  • src/wp-content/themes/twentyfifteen/archive.php

     
    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.
    66 * For example, puts together date-based pages if no date.php file exists.
     
    1010 * already has tag.php for Tag archives, category.php for Category archives,
    1111 * and author.php for Author archives.
    1212 *
    13  * @link http://codex.wordpress.org/Template_Hierarchy
     13 * @link https://codex.wordpress.org/Template_Hierarchy
    1414 *
    1515 * @package WordPress
    1616 * @subpackage Twenty_Fifteen
     
    3131                                ?>
    3232                        </header><!-- .page-header -->
    3333
    34                         <?php /* Start the Loop */ ?>
    35                         <?php while ( have_posts() ) : the_post(); ?>
     34                        <?php
     35                        // Start the Loop.
     36                        while ( have_posts() ) : the_post();
    3637
    37                                 <?php
    38                                         /* Include the Post-Format-specific template for the content.
    39                                          * If you want to override this in a child theme, then include a file
    40                                          * called content-___.php (where ___ is the Post Format name) and that will be used instead.
    41                                          */
    42                                         get_template_part( 'content', get_post_format() );
    43                                 ?>
     38                                /*
     39                                 * Include the Post-Format-specific template for the content.
     40                                 * If you want to override this in a child theme, then include a file
     41                                 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
     42                                 */
     43                                get_template_part( 'content', get_post_format() );
    4444
    45                         <?php endwhile; ?>
     45                        // End the loop.
     46                        endwhile;
    4647
    47                         <?php
    48                                 the_pagination( array(
    49                                         'prev_text'          => __( 'Previous page', 'twentyfifteen' ),
    50                                         'next_text'          => __( 'Next page', 'twentyfifteen' ),
    51                                         'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
    52                                 ) );
    53                         ?>
     48                        // Previous/next page navigation.
     49                        the_pagination( array(
     50                                'prev_text'          => __( 'Previous page', 'twentyfifteen' ),
     51                                'next_text'          => __( 'Next page', 'twentyfifteen' ),
     52                                'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
     53                        ) );
    5454
    55                 <?php else : ?>
     55                // If no content, include the "No posts found" template.
     56                else :
     57                        get_template_part( 'content', 'none' );
    5658
    57                         <?php get_template_part( 'content', 'none' ); ?>
     59                endif;
     60                ?>
    5861
    59                 <?php endif; ?>
    60 
    6162                </main><!-- .site-main -->
    6263        </section><!-- .content-area -->
    6364
    64 <?php get_footer(); ?>
    65  No newline at end of file
     65<?php get_footer(); ?>
  • src/wp-content/themes/twentyfifteen/author-bio.php

     
    11<?php
    22/**
    3  * The template for displaying Author bios.
     3 * The template for displaying Author bios
    44 *
    55 * @package WordPress
    66 * @subpackage Twenty_Fifteen
     
    2020                 * @param int $size The avatar height and width size in pixels.
    2121                 */
    2222                $author_bio_avatar_size = apply_filters( 'twentyfifteen_author_bio_avatar_size', 56 );
     23
    2324                echo get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size );
    2425                ?>
    2526        </div><!-- .author-avatar -->
     27
    2628        <div class="author-description">
    2729                <h3 class="author-title"><?php echo get_the_author(); ?></h3>
     30
    2831                <p class="author-bio">
    2932                        <?php the_author_meta( 'description' ); ?>
    3033                        <a class="author-link" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
    3134                                <?php printf( __( 'View all posts by %s', 'twentyfifteen' ), get_the_author() ); ?>
    3235                        </a>
    3336                </p><!-- .author-bio -->
     37
    3438        </div><!-- .author-description -->
    35 </div><!-- .author-info -->
    36  No newline at end of file
     39</div><!-- .author-info -->
  • src/wp-content/themes/twentyfifteen/comments.php

     
    11<?php
    22/**
    3  * The template for displaying comments.
     3 * The template for displaying comments
    44 *
    55 * The area of the page that contains both current comments
    66 * and the comment form.
     
    5555
    5656        <?php comment_form(); ?>
    5757
    58 </div><!-- .comments-area -->
    59  No newline at end of file
     58</div><!-- .comments-area -->
  • src/wp-content/themes/twentyfifteen/content-link.php

     
    11<?php
    22/**
    3  * The template for displaying link post formats.
     3 * The template for displaying link post formats
    44 *
    55 * Used for both single and index/archive/search.
    66 *
     
    4545        <!-- .entry-content -->
    4646
    4747        <?php
     48                // Author bio.
    4849                if ( is_single() && get_the_author_meta( 'description' ) ) :
    4950                        get_template_part( 'author-bio' );
    5051                endif;
     
    5556                <?php edit_post_link( esc_html__( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>
    5657        </footer>
    5758        <!-- .entry-footer -->
    58 </article><!-- #post-## -->
    59  No newline at end of file
     59
     60</article><!-- #post-## -->
  • src/wp-content/themes/twentyfifteen/content-none.php

     
    11<?php
    22/**
    3  * The template part for displaying a message that posts cannot be found.
     3 * The template part for displaying a message that posts cannot be found
    44 *
    5  * Learn more: http://codex.wordpress.org/Template_Hierarchy
     5 * Learn more: {@link https://codex.wordpress.org/Template_Hierarchy}
    66 *
    77 * @package WordPress
    88 * @subpackage Twenty_Fifteen
     
    1616        </header><!-- .page-header -->
    1717
    1818        <div class="page-content">
     19
    1920                <?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
    2021
    2122                        <p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'twentyfifteen' ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
     
    3132                        <?php get_search_form(); ?>
    3233
    3334                <?php endif; ?>
     35
    3436        </div><!-- .page-content -->
    35 </section><!-- .no-results -->
    36  No newline at end of file
     37</section><!-- .no-results -->
  • src/wp-content/themes/twentyfifteen/content-page.php

     
    11<?php
    22/**
    3  * The template used for displaying page content.
     3 * The template used for displaying page content
    44 *
    55 * @package WordPress
    66 * @subpackage Twenty_Fifteen
     
    99?>
    1010
    1111<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    12         <?php twentyfifteen_post_thumbnail(); ?>
     12        <?php
     13                // Post thumbnail.
     14                twentyfifteen_post_thumbnail();
     15        ?>
    1316
    1417        <header class="entry-header">
    1518                <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
     
    3134
    3235        <?php edit_post_link( esc_html__( 'Edit', 'twentyfifteen' ), '<footer class="entry-footer"><span class="edit-link">', '</span></footer><!-- .entry-footer -->' ); ?>
    3336
    34 </article><!-- #post-## -->
    35  No newline at end of file
     37</article><!-- #post-## -->
  • src/wp-content/themes/twentyfifteen/content-search.php

     
    11<?php
    22/**
    3  * The template part for displaying results in search pages.
     3 * The template part for displaying results in search pages
    44 *
    5  * Learn more: http://codex.wordpress.org/Template_Hierarchy
     5 * Learn more: {@link https://codex.wordpress.org/Template_Hierarchy}
    66 *
    77 * @package WordPress
    88 * @subpackage Twenty_Fifteen
     
    2222        </div><!-- .entry-summary -->
    2323
    2424        <?php if ( 'post' == get_post_type() ) : ?>
     25
    2526                <footer class="entry-footer">
    2627                        <?php twentyfifteen_entry_meta(); ?>
    2728                        <?php edit_post_link( esc_html__( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>
    2829                </footer><!-- .entry-footer -->
     30
    2931        <?php else : ?>
     32
    3033                <?php edit_post_link( esc_html__( 'Edit', 'twentyfifteen' ), '<footer class="entry-footer"><span class="edit-link">', '</span></footer><!-- .entry-footer -->' ); ?>
     34
    3135        <?php endif; ?>
    32 </article><!-- #post-## -->
    33  No newline at end of file
     36
     37</article><!-- #post-## -->
  • src/wp-content/themes/twentyfifteen/content.php

     
    11<?php
    22/**
    3  * The default template for displaying content.
     3 * The default template for displaying content
    44 *
    55 * Used for both single and index/archive/search.
    66 *
     
    1111?>
    1212
    1313<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    14         <?php twentyfifteen_post_thumbnail(); ?>
     14        <?php
     15                // Post thumbnail.
     16                twentyfifteen_post_thumbnail();
     17        ?>
    1518
    1619        <header class="entry-header">
    1720                <?php
     
    4346        </div><!-- .entry-content -->
    4447
    4548        <?php
     49                // Author bio.
    4650                if ( is_single() && get_the_author_meta( 'description' ) ) :
    4751                        get_template_part( 'author-bio' );
    4852                endif;
     
    5256                <?php twentyfifteen_entry_meta(); ?>
    5357                <?php edit_post_link( esc_html__( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>
    5458        </footer><!-- .entry-footer -->
    55 </article><!-- #post-## -->
    56  No newline at end of file
     59
     60</article><!-- #post-## -->
  • src/wp-content/themes/twentyfifteen/footer.php

     
    11<?php
    22/**
    3  * The template for displaying the footer.
     3 * The template for displaying the footer
    44 *
    55 * Contains the closing of the "site-content" div and all content after.
    66 *
     
    2222                                 */
    2323                                do_action( 'twentyfifteen_credits' );
    2424                        ?>
    25                         <a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twentyfifteen' ) ); ?>"><?php printf( esc_html__( 'Proudly powered by %s', 'twentyfifteen' ), 'WordPress' ); ?></a>
     25                        <a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentyfifteen' ) ); ?>"><?php printf( esc_html__( 'Proudly powered by %s', 'twentyfifteen' ), 'WordPress' ); ?></a>
    2626                </div><!-- .site-info -->
    2727        </footer><!-- .site-footer -->
     28
    2829</div><!-- .site -->
    2930
    3031<?php wp_footer(); ?>
    3132
    3233</body>
    33 </html>
    34  No newline at end of file
     34</html>
  • src/wp-content/themes/twentyfifteen/functions.php

     
    11<?php
    22/**
    3  * Twenty Fifteen functions and definitions.
     3 * Twenty Fifteen functions and definitions
    44 *
    55 * Set up the theme and provides some helper functions, which are used in the
    66 * theme as custom template tags. Others are attached to action and filter
     
    1111 * functions.php file. The child theme's functions.php file is included before
    1212 * the parent theme's file, so the child theme functions would be used.
    1313 *
    14  * @link http://codex.wordpress.org/Theme_Development
    15  * @link http://codex.wordpress.org/Child_Themes
     14 * @link https://codex.wordpress.org/Theme_Development
     15 * @link https://codex.wordpress.org/Child_Themes
    1616 *
    1717 * Functions that are not pluggable (not wrapped in function_exists()) are
    1818 * instead attached to a filter or action hook.
    1919 *
    2020 * For more information on hooks, actions, and filters,
    21  * @link http://codex.wordpress.org/Plugin_API
     21 * {@link https://codex.wordpress.org/Plugin_API}
    2222 *
    2323 * @package WordPress
    2424 * @subpackage Twenty_Fifteen
     
    7575        /*
    7676         * Enable support for Post Thumbnails on posts and pages.
    7777         *
    78          * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
     78         * See: https://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
    7979         */
    8080        add_theme_support( 'post-thumbnails' );
    8181        set_post_thumbnail_size( 825, 510, true );
     
    9696
    9797        /*
    9898         * Enable support for Post Formats.
    99          * See http://codex.wordpress.org/Post_Formats
     99         *
     100         * See: https://codex.wordpress.org/Post_Formats
    100101         */
    101102        add_theme_support( 'post-formats', array(
    102103                'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat'
     
    125126 *
    126127 * @since Twenty Fifteen 1.0
    127128 *
    128  * @link http://codex.wordpress.org/Function_Reference/register_sidebar
     129 * @link https://codex.wordpress.org/Function_Reference/register_sidebar
    129130 */
    130131function twentyfifteen_widgets_init() {
    131132        register_sidebar( array(
  • src/wp-content/themes/twentyfifteen/header.php

     
    11<?php
    22/**
    3  * The header for our theme.
     3 * The template for displaying the header
    44 *
    5  * Displays all of the <head> section and everything up until the "site-content" div.
     5 * Displays all of the &lt;head&gt; section and everything up until the "site-content" div.
    66 *
    77 * @package WordPress
    88 * @subpackage Twenty_Fifteen
     
    4848                <?php get_sidebar(); ?>
    4949        </div><!-- .sidebar -->
    5050
    51         <div id="content" class="site-content">
    52  No newline at end of file
     51        <div id="content" class="site-content">
  • src/wp-content/themes/twentyfifteen/image.php

     
    11<?php
    22/**
    3  * The template for displaying all single posts and attachments.
     3 * The template for displaying image attachments
    44 *
    55 * @package WordPress
    66 * @subpackage Twenty_Fifteen
     
    1212        <div id="primary" class="content-area">
    1313                <main id="main" class="site-main" role="main">
    1414
    15                         <?php while ( have_posts() ) : the_post(); ?>
     15                        <?php
     16                                // Start the loop.
     17                                while ( have_posts() ) : the_post();
     18                        ?>
    1619
    1720                                <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
     21
    1822                                        <nav id="image-navigation" class="navigation image-navigation">
    1923                                                <div class="nav-links">
    2024                                                        <div class="nav-previous"><?php previous_image_link( false, esc_html__( 'Previous Image', 'twentyfifteen' ) ); ?></div><div class="nav-next"><?php next_image_link( false, esc_html__( 'Next Image', 'twentyfifteen' ) ); ?></div>
     
    2630                                        </header><!-- .entry-header -->
    2731
    2832                                        <div class="entry-content">
     33
    2934                                                <div class="entry-attachment">
    3035                                                        <?php
    3136                                                                /**
     
    3641                                                                 * @param string $image_size Image size. Default 'large'.
    3742                                                                 */
    3843                                                                $image_size = apply_filters( 'twentyfifteen_attachment_size', 'large' );
     44
    3945                                                                echo wp_get_attachment_image( get_the_ID(), $image_size );
    4046                                                        ?>
    4147
     
    4450                                                                        <?php the_excerpt(); ?>
    4551                                                                </div><!-- .entry-caption -->
    4652                                                        <?php endif; ?>
     53
    4754                                                </div><!-- .entry-attachment -->
    4855
    4956                                                <?php
     
    6370                                                <?php twentyfifteen_entry_meta(); ?>
    6471                                                <?php edit_post_link( esc_html__( 'Edit', 'twentyfifteen' ), '<span class="edit-link">', '</span>' ); ?>
    6572                                        </footer><!-- .entry-footer -->
     73
    6674                                </article><!-- #post-## -->
    6775
    6876                                <?php
     
    7078                                        if ( comments_open() || get_comments_number() ) :
    7179                                                comments_template();
    7280                                        endif;
    73                                 ?>
    7481
    75                                 <?php
     82                                        // Previous/next post navigation.
    7683                                        the_post_navigation( array(
    7784                                                'prev_text' => _x( '<span class="meta-nav">Published in</span><span class="post-title">%title</span>', 'Parent post link', 'twentyfifteen' ),
    7885                                        ) );
    79                                 ?>
    8086
    81                         <?php endwhile; // end of the loop. ?>
     87                                // End the loop.
     88                                endwhile;
     89                        ?>
    8290
    8391                </main><!-- .site-main -->
    8492        </div><!-- .content-area -->
    8593
    86 <?php get_footer(); ?>
    87  No newline at end of file
     94<?php get_footer(); ?>
  • src/wp-content/themes/twentyfifteen/index.php

     
    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
    66 * and one of the two required files for a theme (the other being style.css).
    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
    1413 * @subpackage Twenty_Fifteen
     
    2827                                </header>
    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' ); ?>
     55                endif;
     56                ?>
    5457
    55                 <?php endif; ?>
    56 
    5758                </main><!-- .site-main -->
    5859        </div><!-- .content-area -->
    5960
    60 <?php get_footer(); ?>
    61  No newline at end of file
     61<?php get_footer(); ?>
  • src/wp-content/themes/twentyfifteen/page.php

     
    11<?php
    22/**
    3  * The template for displaying pages.
     3 * The template for displaying pages
    44 *
    55 * This is the template that displays all pages by default.
    66 * Please note that this is the WordPress construct of pages and that
     
    1616        <div id="primary" class="content-area">
    1717                <main id="main" class="site-main" role="main">
    1818
    19                 <?php while ( have_posts() ) : the_post(); ?>
     19                <?php
     20                // Start the loop.
     21                while ( have_posts() ) : the_post();
    2022
    21                         <?php get_template_part( 'content', 'page' ); ?>
     23                        // Include the page content template.
     24                        get_template_part( 'content', 'page' );
    2225
    23                         <?php
    24                                 // If comments are open or we have at least one comment, load up the comment template
    25                                 if ( comments_open() || get_comments_number() ) :
    26                                         comments_template();
    27                                 endif;
    28                         ?>
     26                        // If comments are open or we have at least one comment, load up the comment template.
     27                        if ( comments_open() || get_comments_number() ) :
     28                                comments_template();
     29                        endif;
    2930
    30                 <?php endwhile; // end of the loop. ?>
     31                // End the loop.
     32                endwhile;
     33                ?>
    3134
    3235                </main><!-- .site-main -->
    3336        </div><!-- .content-area -->
    3437
    35 <?php get_footer(); ?>
    36  No newline at end of file
     38<?php get_footer(); ?>
  • src/wp-content/themes/twentyfifteen/rtl.css

     
    44It's easy, just a matter of overwriting all the horizontal positioning attributes
    55of your CSS stylesheet in a separate stylesheet file named rtl.css.
    66
    7 See http://codex.wordpress.org/Right_to_Left_Language_Support
     7See: https://codex.wordpress.org/Right_to_Left_Language_Support
    88*/
    99
    1010/**
  • src/wp-content/themes/twentyfifteen/search.php

     
    1818                                <h1 class="page-title"><?php printf( esc_html__( 'Search Results for: %s', 'twentyfifteen' ), get_search_query() ); ?></h1>
    1919                        </header><!-- .page-header -->
    2020
    21                         <?php /* Start the Loop */ ?>
    22                         <?php while ( have_posts() ) : the_post(); ?>
     21                        <?php
     22                        // Start the loop.
     23                        while ( have_posts() ) : the_post(); ?>
    2324
    2425                                <?php
    25                                 /**
     26                                /*
    2627                                 * Run the loop for the search to output the results.
    2728                                 * If you want to overload this in a child theme then include a file
    2829                                 * called content-search.php and that will be used instead.
    2930                                 */
    3031                                get_template_part( 'content', 'search' );
    31                                 ?>
    3232
    33                         <?php endwhile; ?>
     33                        // End the loop.
     34                        endwhile;
    3435
    35                         <?php
    36                                 the_pagination( array(
    37                                         'prev_text'          => __( 'Previous page', 'twentyfifteen' ),
    38                                         'next_text'          => __( 'Next page', 'twentyfifteen' ),
    39                                         'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
    40                                 ) );
    41                         ?>
     36                        // Previous/next page navigation.
     37                        the_pagination( array(
     38                                'prev_text'          => __( 'Previous page', 'twentyfifteen' ),
     39                                'next_text'          => __( 'Next page', 'twentyfifteen' ),
     40                                'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
     41                        ) );
    4242
    43                 <?php else : ?>
     43                // If no content, include the "No posts found" template.
     44                else :
     45                        get_template_part( 'content', 'none' );
    4446
    45                         <?php get_template_part( 'content', 'none' ); ?>
     47                endif;
     48                ?>
    4649
    47                 <?php endif; ?>
    48 
    4950                </main><!-- .site-main -->
    5051        </section><!-- .content-area -->
    5152
  • src/wp-content/themes/twentyfifteen/sidebar.php

     
    11<?php
    22/**
    3  * The sidebar containing the main widget area.
     3 * The sidebar containing the main widget area
    44 *
    55 * @package WordPress
    66 * @subpackage Twenty_Fifteen
     
    99
    1010if ( has_nav_menu( 'primary' ) || has_nav_menu( 'social' ) || is_active_sidebar( 'sidebar-1' )  ) : ?>
    1111        <div id="secondary" class="secondary">
     12
    1213                <?php if ( has_nav_menu( 'primary' ) ) : ?>
    13                 <nav id="site-navigation" class="main-navigation" role="navigation">
    14                         <?php
    15                                 wp_nav_menu( array(
    16                                         'menu_class'     => 'nav-menu',
    17                                         'theme_location' => 'primary',
    18                                 ) );
    19                         ?>
    20                 </nav><!-- .main-navigation -->
     14                        <nav id="site-navigation" class="main-navigation" role="navigation">
     15                                <?php
     16                                        // Primary navigation menu.
     17                                        wp_nav_menu( array(
     18                                                'menu_class'     => 'nav-menu',
     19                                                'theme_location' => 'primary',
     20                                        ) );
     21                                ?>
     22                        </nav><!-- .main-navigation -->
    2123                <?php endif; ?>
    2224
    2325                <?php if ( has_nav_menu( 'social' ) ) : ?>
    24                 <nav id="social-navigation" class="social-navigation" role="navigation">
    25                         <?php
    26                                 wp_nav_menu( array(
    27                                         'theme_location' => 'social',
    28                                         'depth'          => 1,
    29                                         'link_before'    => '<span class="screen-reader-text">',
    30                                         'link_after'     => '</span>',
    31                                 ) );
    32                         ?>
    33                 </nav><!-- .social-navigation -->
     26                        <nav id="social-navigation" class="social-navigation" role="navigation">
     27                                <?php
     28                                        // Social links navigation menu.
     29                                        wp_nav_menu( array(
     30                                                'theme_location' => 'social',
     31                                                'depth'          => 1,
     32                                                'link_before'    => '<span class="screen-reader-text">',
     33                                                'link_after'     => '</span>',
     34                                        ) );
     35                                ?>
     36                        </nav><!-- .social-navigation -->
    3437                <?php endif; ?>
    3538
    3639                <?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
    37                 <div id="widget-area" class="widget-area" role="complementary">
    38                         <?php dynamic_sidebar( 'sidebar-1' ); ?>
    39                 </div><!-- .widget-area -->
     40                        <div id="widget-area" class="widget-area" role="complementary">
     41                                <?php dynamic_sidebar( 'sidebar-1' ); ?>
     42                        </div><!-- .widget-area -->
    4043                <?php endif; ?>
     44
    4145        </div><!-- .secondary -->
    42 <?php endif; ?>
    43  No newline at end of file
     46
     47<?php endif; ?>
  • src/wp-content/themes/twentyfifteen/single.php

     
    11<?php
    22/**
    3  * The template for displaying all single posts and attachments.
     3 * The template for displaying all single posts and attachments
    44 *
    55 * @package WordPress
    66 * @subpackage Twenty_Fifteen
     
    1212        <div id="primary" class="content-area">
    1313                <main id="main" class="site-main" role="main">
    1414
    15                 <?php while ( have_posts() ) : the_post(); ?>
     15                <?php
     16                // Start the loop.
     17                while ( have_posts() ) : the_post();
    1618
    17                         <?php get_template_part( 'content', get_post_format() ); ?>
     19                        /*
     20                         * Include the post format-specific template for the content. If you want to
     21                         * use this in a child theme, then include a file called called content-___.php
     22                         * (where ___ is the post format) and that will be used instead.
     23                         */
     24                        get_template_part( 'content', get_post_format() );
    1825
    19                         <?php
    20                                 // If comments are open or we have at least one comment, load up the comment template
    21                                 if ( comments_open() || get_comments_number() ) :
    22                                         comments_template();
    23                                 endif;
    24                         ?>
     26                        // If comments are open or we have at least one comment, load up the comment template.
     27                        if ( comments_open() || get_comments_number() ) :
     28                                comments_template();
     29                        endif;
    2530
    26                         <?php
    27                                 the_post_navigation( array(
    28                                         'next_text' => _x( '<span class="meta-nav">Next <span class="screen-reader-text">post:</span></span><span class="post-title">%title</span>', 'Next post link', 'twentyfifteen' ),
    29                                         'prev_text' => _x( '<span class="meta-nav">Previous <span class="screen-reader-text">post:</span></span><span class="post-title">%title</span>', 'Previous post link', 'twentyfifteen' )
    30                                 ) );
    31                         ?>
     31                        // Previous/next post navigation.
     32                        the_post_navigation( array(
     33                                'next_text' => _x( '<span class="meta-nav">Next <span class="screen-reader-text">post:</span></span><span class="post-title">%title</span>', 'Next post link', 'twentyfifteen' ),
     34                                'prev_text' => _x( '<span class="meta-nav">Previous <span class="screen-reader-text">post:</span></span><span class="post-title">%title</span>', 'Previous post link', 'twentyfifteen' )
     35                        ) );
    3236
    33                 <?php endwhile; // end of the loop. ?>
     37                // End the loop.
     38                endwhile;
     39                ?>
    3440
    3541                </main><!-- .site-main -->
    3642        </div><!-- .content-area -->
    3743
    38 <?php get_footer(); ?>
    39  No newline at end of file
     44<?php get_footer(); ?>
  • src/wp-content/themes/twentyfifteen/style.css

     
    11/*
    22Theme Name: Twenty Fifteen
    3 Theme URI: http://wordpress.org/themes/twentyfifteen
     3Theme URI: https://wordpress.org/themes/twentyfifteen
    44Author: the WordPress team
    5 Author URI: http://wordpress.org/
     5Author URI: https://wordpress.org/
    66Description: Our 2015 default theme is clean, blog-focused, and designed for clarity. Twenty Fifteen's simple, straightforward typography is readable on a wide variety of screen sizes, and suitable for multiple languages. We designed it using a mobile-first approach, meaning your content takes center-stage, regardless of whether your visitors arrive by smartphone, tablet, laptop, or desktop computer.
    77Version: 0.1
    88License: GNU General Public License v2 or later
     
    25932593 * 15.0 Media Queries
    25942594 */
    25952595
    2596 /* Does the same thing as <meta name="viewport" content="width=device-width">,
     2596/*
     2597 * Does the same thing as <meta name="viewport" content="width=device-width">,
    25972598 * but in the future W3C standard way. -ms- prefix is required for IE10+ to
    25982599 * render responsive styling in Windows 8 "snapped" views; IE10+ does not honor
    2599  * the meta tag. See http://core.trac.wordpress.org/ticket/25888.
     2600 * the meta tag. See https://core.trac.wordpress.org/ticket/25888.
    26002601 */
    26012602@-ms-viewport {
    26022603        width: device-width;