WordPress/wp-content/themes/twentytwenty/template-parts/content.php
desrosj a734d8eea1 Bundled Themes: Update Twenty Twenty.
This brings `trunk`'s version of Twenty Twenty in-sync with GitHub.

For a complete list of changes since [46357], see 7157870...7246fd6.

Props anlino, ianbelanger, poena, williampatton, nielslange, acosmin, netweb, joyusly, luminuu, itowhid06, cbravobernal, intimez, glauberglauber, ocean90, amolv, briceduclos, aristath, mukesh27, garrett-eclipse, audrasjb, afercia, dianeco, utsav72640, mahesh901122, tobifjellner.
See #48110.
Built from https://develop.svn.wordpress.org/trunk@46445


git-svn-id: http://core.svn.wordpress.org/trunk@46243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-08 19:08:07 +00:00

92 lines
1.9 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* The default template for displaying content
*
* Used for both singular and index.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package WordPress
* @subpackage Twenty_Twenty
* @since 1.0.0
*/
?>
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<?php
get_template_part( 'template-parts/entry-header' );
if ( ! is_search() ) {
get_template_part( 'template-parts/featured-image' );
}
?>
<div class="post-inner section-inner <?php echo is_page_template( 'templates/template-full-width.php' ) ? '' : 'thin'; ?> ">
<div class="entry-content">
<?php
if ( is_search() || ! is_singular() && 'summary' === get_theme_mod( 'blog_content', 'full' ) ) {
the_excerpt();
} else {
the_content();
}
?>
</div><!-- .entry-content -->
<?php
wp_link_pages(
array(
'before' => '<nav class="post-nav-links bg-light-background" aria-label="' . esc_attr__( 'Page', 'twentytwenty' ) . '"><span class="label">' . __( 'Pages:', 'twentytwenty' ) . '</span>',
'after' => '</nav>',
'link_before' => '<span class="page-number">',
'link_after' => '</span>',
)
);
edit_post_link();
// Single bottom post meta.
twentytwenty_the_post_meta( get_the_ID(), 'single-bottom' );
if ( is_single() ) {
get_template_part( 'template-parts/entry-author-bio' );
}
?>
</div><!-- .post-inner -->
<?php
if ( is_single() ) {
get_template_part( 'template-parts/navigation' );
}
/**
* Output comments wrapper if it's a post, or if comments are open,
* or if there's a comment number and check for password.
* */
if ( ( 'post' === $post->post_type || comments_open() || get_comments_number() ) && ! post_password_required() ) {
?>
<div class="comments-wrapper section-inner">
<?php comments_template(); ?>
</div><!-- .comments-wrapper -->
<?php
}
?>
</article><!-- .post -->