diff options
Diffstat (limited to 'themes/twentysixteen/inc/template-tags.php')
-rw-r--r-- | themes/twentysixteen/inc/template-tags.php | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/themes/twentysixteen/inc/template-tags.php b/themes/twentysixteen/inc/template-tags.php index 55578bea..005e5374 100644 --- a/themes/twentysixteen/inc/template-tags.php +++ b/themes/twentysixteen/inc/template-tags.php @@ -29,7 +29,7 @@ if ( ! function_exists( 'twentysixteen_entry_meta' ) ) : ); } - if ( in_array( get_post_type(), array( 'post', 'attachment' ) ) ) { + if ( in_array( get_post_type(), array( 'post', 'attachment' ), true ) ) { twentysixteen_entry_date(); } @@ -49,6 +49,7 @@ if ( ! function_exists( 'twentysixteen_entry_meta' ) ) : if ( ! is_singular() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { echo '<span class="comments-link">'; + /* translators: %s: Post title. */ comments_popup_link( sprintf( __( 'Leave a comment<span class="screen-reader-text"> on %s</span>', 'twentysixteen' ), get_the_title() ) ); echo '</span>'; } @@ -146,7 +147,7 @@ if ( ! function_exists( 'twentysixteen_post_thumbnail' ) ) : </a> <?php - endif; // End is_singular() + endif; // End is_singular(). } endif; @@ -190,7 +191,7 @@ if ( ! function_exists( 'twentysixteen_excerpt_more' ) && ! is_admin() ) : $link = sprintf( '<a href="%1$s" class="more-link">%2$s</a>', esc_url( get_permalink( get_the_ID() ) ), - /* translators: %s: Name of current post */ + /* translators: %s: Post title. */ sprintf( __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentysixteen' ), get_the_title( get_the_ID() ) ) ); return ' … ' . $link; @@ -209,7 +210,8 @@ if ( ! function_exists( 'twentysixteen_categorized_blog' ) ) : * @return bool True if there is more than one category, false otherwise. */ function twentysixteen_categorized_blog() { - if ( false === ( $all_the_cool_cats = get_transient( 'twentysixteen_categories' ) ) ) { + $all_the_cool_cats = get_transient( 'twentysixteen_categories' ); + if ( false === $all_the_cool_cats ) { // Create an array of all the categories that are attached to posts. $all_the_cool_cats = get_categories( array( @@ -226,10 +228,10 @@ if ( ! function_exists( 'twentysixteen_categorized_blog' ) ) : } if ( $all_the_cool_cats > 1 || is_preview() ) { - // This blog has more than 1 category so twentysixteen_categorized_blog should return true. + // This blog has more than 1 category so twentysixteen_categorized_blog() should return true. return true; } else { - // This blog has only 1 category so twentysixteen_categorized_blog should return false. + // This blog has only 1 category so twentysixteen_categorized_blog() should return false. return false; } } @@ -269,7 +271,7 @@ if ( ! function_exists( 'wp_body_open' ) ) : /** * Fire the wp_body_open action. * - * Added for backwards compatibility to support pre 5.2.0 WordPress versions. + * Added for backward compatibility to support pre-5.2.0 WordPress versions. * * @since Twenty Sixteen 2.0 */ |