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 git-svn-id: https://develop.svn.wordpress.org/trunk@38873 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9e253ab075
commit
a5d69e176a
@ -37,7 +37,7 @@ get_header(); ?>
|
||||
* If you want to override this in a child theme, then include a file
|
||||
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
|
||||
*/
|
||||
get_template_part( 'components/post/content', get_post_format() );
|
||||
get_template_part( 'template-parts/post/content', get_post_format() );
|
||||
|
||||
endwhile;
|
||||
|
||||
@ -49,7 +49,7 @@ get_header(); ?>
|
||||
|
||||
else :
|
||||
|
||||
get_template_part( 'components/post/content', 'none' );
|
||||
get_template_part( 'template-parts/post/content', 'none' );
|
||||
|
||||
endif; ?>
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
<footer id="colophon" class="site-footer" role="contentinfo">
|
||||
<div class="wrap">
|
||||
<?php
|
||||
get_template_part( 'components/footer/footer', 'widgets' );
|
||||
get_template_part( 'template-parts/footer/footer', 'widgets' );
|
||||
|
||||
if ( has_nav_menu( 'social' ) ) : ?>
|
||||
<nav class="social-navigation" role="navigation" aria-label="<?php _e( 'Footer Social Links Menu', 'twentyseventeen' ); ?>">
|
||||
@ -35,7 +35,7 @@
|
||||
</nav><!-- .social-navigation -->
|
||||
<?php endif;
|
||||
|
||||
get_template_part( 'components/footer/site', 'info' );
|
||||
get_template_part( 'template-parts/footer/site', 'info' );
|
||||
?>
|
||||
</div><!-- .wrap -->
|
||||
</footer><!-- #colophon -->
|
||||
|
@ -20,10 +20,10 @@ get_header(); ?>
|
||||
<?php // Show the selected frontpage content.
|
||||
if ( have_posts() ) :
|
||||
while ( have_posts() ) : the_post();
|
||||
get_template_part( 'components/page/content', 'front-page' );
|
||||
get_template_part( 'template-parts/page/content', 'front-page' );
|
||||
endwhile;
|
||||
else : // I'm not sure it's possible to have no posts when this page is shown, but WTH.
|
||||
get_template_part( 'components/post/content', 'none' );
|
||||
get_template_part( 'template-parts/post/content', 'none' );
|
||||
endif; ?>
|
||||
|
||||
<?php
|
||||
@ -31,7 +31,7 @@ get_header(); ?>
|
||||
$panels = array( '1', '2', '3', '4' );
|
||||
$titles = array();
|
||||
|
||||
global $twentyseventeencounter; // Used in components/page/content-front-page-panels.php file.
|
||||
global $twentyseventeencounter; // Used in template-parts/page/content-front-page-panels.php file.
|
||||
|
||||
if ( 0 !== twentyseventeen_panel_count() || is_customize_preview() ) : // If we have pages to show.
|
||||
|
||||
@ -44,7 +44,7 @@ get_header(); ?>
|
||||
set_query_var( 'panel', $panel );
|
||||
|
||||
$titles[] = get_the_title(); // Put page titles in an array for use in navigation.
|
||||
get_template_part( 'components/page/content', 'front-page-panels' );
|
||||
get_template_part( 'template-parts/page/content', 'front-page-panels' );
|
||||
|
||||
wp_reset_postdata();
|
||||
else :
|
||||
|
@ -28,12 +28,12 @@
|
||||
|
||||
<header id="masthead" class="site-header" role="banner">
|
||||
|
||||
<?php get_template_part( 'components/header/header', 'image' ); ?>
|
||||
<?php get_template_part( 'template-parts/header/header', 'image' ); ?>
|
||||
|
||||
<?php if ( has_nav_menu( 'top' ) ) : ?>
|
||||
<div class="navigation-top">
|
||||
<div class="wrap">
|
||||
<?php get_template_part( 'components/navigation/navigation', 'top' ); ?>
|
||||
<?php get_template_part( 'template-parts/navigation/navigation', 'top' ); ?>
|
||||
</div><!-- .wrap -->
|
||||
</div><!-- .navigation-top -->
|
||||
<?php endif; ?>
|
||||
|
@ -42,7 +42,7 @@ get_header(); ?>
|
||||
* If you want to override this in a child theme, then include a file
|
||||
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
|
||||
*/
|
||||
get_template_part( 'components/post/content', get_post_format() );
|
||||
get_template_part( 'template-parts/post/content', get_post_format() );
|
||||
|
||||
endwhile;
|
||||
|
||||
@ -54,7 +54,7 @@ get_header(); ?>
|
||||
|
||||
else :
|
||||
|
||||
get_template_part( 'components/post/content', 'none' );
|
||||
get_template_part( 'template-parts/post/content', 'none' );
|
||||
|
||||
endif;
|
||||
?>
|
||||
|
@ -24,7 +24,7 @@ get_header(); ?>
|
||||
<?php
|
||||
while ( have_posts() ) : the_post();
|
||||
|
||||
get_template_part( 'components/page/content', 'page' );
|
||||
get_template_part( 'template-parts/page/content', 'page' );
|
||||
|
||||
// If comments are open or we have at least one comment, load up the comment template.
|
||||
if ( comments_open() || get_comments_number() ) :
|
||||
|
@ -35,7 +35,7 @@ get_header(); ?>
|
||||
* If you want to overload this in a child theme then include a file
|
||||
* called content-search.php and that will be used instead.
|
||||
*/
|
||||
get_template_part( 'components/post/content', 'excerpt' );
|
||||
get_template_part( 'template-parts/post/content', 'excerpt' );
|
||||
|
||||
endwhile; // End of the loop.
|
||||
|
||||
|
@ -20,7 +20,7 @@ get_header(); ?>
|
||||
/* Start the Loop */
|
||||
while ( have_posts() ) : the_post();
|
||||
|
||||
get_template_part( 'components/post/content', get_post_format() );
|
||||
get_template_part( 'template-parts/post/content', get_post_format() );
|
||||
|
||||
// If comments are open or we have at least one comment, load up the comment template.
|
||||
if ( comments_open() || get_comments_number() ) :
|
||||
|
@ -17,12 +17,12 @@
|
||||
if ( ! empty( $header_image ) ) : ?>
|
||||
|
||||
<div class="custom-header-image" style="background-image: url(<?php echo esc_url( $header_image ); ?>)"></div>
|
||||
<?php get_template_part( 'components/header/site', 'branding' ); ?>
|
||||
<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
|
||||
|
||||
<?php else : ?>
|
||||
<?php // Otherwise, show a blank header. ?>
|
||||
<div class="custom-header-simple">
|
||||
<?php get_template_part( 'components/header/site', 'branding' ); ?>
|
||||
<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
|
||||
</div><!-- .custom-header-simple -->
|
||||
|
||||
<?php endif; ?>
|
@ -73,7 +73,7 @@ global $twentyseventeencounter;
|
||||
|
||||
<?php
|
||||
while ( $recent_posts->have_posts() ) : $recent_posts->the_post();
|
||||
get_template_part( 'components/post/content', 'excerpt' );
|
||||
get_template_part( 'template-parts/post/content', 'excerpt' );
|
||||
endwhile;
|
||||
wp_reset_postdata();
|
||||
?>
|
Loading…
Reference in New Issue
Block a user