WordPress.org

Make WordPress Core

Changeset 38875


Ignore:
Timestamp:
10/23/2016 12:28:27 PM (5 years ago)
Author:
karmatosed
Message:

Twenty Seventeen: Renaming of directory structure

This changes components directory to be called template-parts. Changes reflected in all files that call those sections.

Props bronsonquick, dd32

Fixes #38375

Location:
trunk/src/wp-content/themes/twentyseventeen
Files:
10 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyseventeen/archive.php

    r38874 r38875  
    3838                 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
    3939                 */
    40                 get_template_part( 'components/post/content', get_post_format() );
     40                get_template_part( 'template-parts/post/content', get_post_format() );
    4141
    4242            endwhile;
     
    5050        else :
    5151
    52             get_template_part( 'components/post/content', 'none' );
     52            get_template_part( 'template-parts/post/content', 'none' );
    5353
    5454        endif; ?>
  • trunk/src/wp-content/themes/twentyseventeen/footer.php

    r38874 r38875  
    2020        <div class="wrap">
    2121            <?php
    22             get_template_part( 'components/footer/footer', 'widgets' );
     22            get_template_part( 'template-parts/footer/footer', 'widgets' );
    2323
    2424            if ( has_nav_menu( 'social' ) ) : ?>
     
    3636            <?php endif;
    3737
    38             get_template_part( 'components/footer/site', 'info' );
     38            get_template_part( 'template-parts/footer/site', 'info' );
    3939            ?>
    4040        </div><!-- .wrap -->
  • trunk/src/wp-content/themes/twentyseventeen/front-page.php

    r38874 r38875  
    2121        if ( have_posts() ) :
    2222            while ( have_posts() ) : the_post();
    23                 get_template_part( 'components/page/content', 'front-page' );
     23                get_template_part( 'template-parts/page/content', 'front-page' );
    2424            endwhile;
    2525        else : // I'm not sure it's possible to have no posts when this page is shown, but WTH.
    26             get_template_part( 'components/post/content', 'none' );
     26            get_template_part( 'template-parts/post/content', 'none' );
    2727        endif; ?>
    2828
     
    3232        $titles = array();
    3333
    34         global $twentyseventeencounter; // Used in components/page/content-front-page-panels.php file.
     34        global $twentyseventeencounter; // Used in template-parts/page/content-front-page-panels.php file.
    3535
    3636        if ( 0 !== twentyseventeen_panel_count() || is_customize_preview() ) : // If we have pages to show.
     
    4545
    4646                    $titles[] = get_the_title(); // Put page titles in an array for use in navigation.
    47                     get_template_part( 'components/page/content', 'front-page-panels' );
     47                    get_template_part( 'template-parts/page/content', 'front-page-panels' );
    4848
    4949                    wp_reset_postdata();
  • trunk/src/wp-content/themes/twentyseventeen/header.php

    r38874 r38875  
    2929    <header id="masthead" class="site-header" role="banner">
    3030
    31         <?php get_template_part( 'components/header/header', 'image' ); ?>
     31        <?php get_template_part( 'template-parts/header/header', 'image' ); ?>
    3232
    3333        <?php if ( has_nav_menu( 'top' ) ) : ?>
    3434            <div class="navigation-top">
    3535                <div class="wrap">
    36                     <?php get_template_part( 'components/navigation/navigation', 'top' ); ?>
     36                    <?php get_template_part( 'template-parts/navigation/navigation', 'top' ); ?>
    3737                </div><!-- .wrap -->
    3838            </div><!-- .navigation-top -->
  • trunk/src/wp-content/themes/twentyseventeen/index.php

    r38874 r38875  
    4343                     * called content-___.php (where ___ is the Post Format name) and that will be used instead.
    4444                     */
    45                     get_template_part( 'components/post/content', get_post_format() );
     45                    get_template_part( 'template-parts/post/content', get_post_format() );
    4646
    4747                endwhile;
     
    5555            else :
    5656
    57                 get_template_part( 'components/post/content', 'none' );
     57                get_template_part( 'template-parts/post/content', 'none' );
    5858
    5959            endif;
  • trunk/src/wp-content/themes/twentyseventeen/page.php

    r38874 r38875  
    2525            while ( have_posts() ) : the_post();
    2626
    27                 get_template_part( 'components/page/content', 'page' );
     27                get_template_part( 'template-parts/page/content', 'page' );
    2828
    2929                // If comments are open or we have at least one comment, load up the comment template.
  • trunk/src/wp-content/themes/twentyseventeen/search.php

    r38874 r38875  
    3636                 * called content-search.php and that will be used instead.
    3737                 */
    38                 get_template_part( 'components/post/content', 'excerpt' );
     38                get_template_part( 'template-parts/post/content', 'excerpt' );
    3939
    4040            endwhile; // End of the loop.
  • trunk/src/wp-content/themes/twentyseventeen/single.php

    r38874 r38875  
    2121                while ( have_posts() ) : the_post();
    2222
    23                     get_template_part( 'components/post/content', get_post_format() );
     23                    get_template_part( 'template-parts/post/content', get_post_format() );
    2424
    2525                    // If comments are open or we have at least one comment, load up the comment template.
  • trunk/src/wp-content/themes/twentyseventeen/template-parts/header/header-image.php

    r38868 r38875  
    1818
    1919        <div class="custom-header-image" style="background-image: url(<?php echo esc_url( $header_image ); ?>)"></div>
    20         <?php get_template_part( 'components/header/site', 'branding' ); ?>
     20        <?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
    2121
    2222    <?php else : ?>
    2323        <?php // Otherwise, show a blank header. ?>
    2424        <div class="custom-header-simple">
    25             <?php get_template_part( 'components/header/site', 'branding' ); ?>
     25            <?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
    2626        </div><!-- .custom-header-simple -->
    2727
  • trunk/src/wp-content/themes/twentyseventeen/template-parts/page/content-front-page-panels.php

    r38833 r38875  
    7474                        <?php
    7575                        while ( $recent_posts->have_posts() ) : $recent_posts->the_post();
    76                             get_template_part( 'components/post/content', 'excerpt' );
     76                            get_template_part( 'template-parts/post/content', 'excerpt' );
    7777                        endwhile;
    7878                        wp_reset_postdata();
Note: See TracChangeset for help on using the changeset viewer.