diff --git a/inc/template-tags.php b/inc/template-tags.php
index df23979..63eadf2 100644
--- a/inc/template-tags.php
+++ b/inc/template-tags.php
@@ -14,28 +14,23 @@ if ( ! function_exists( 'understrap_posted_on' ) ) :
function understrap_posted_on() {
$time_string = '';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
- $time_string = ', ';
+ $time_string = '';
}
-
$time_string = sprintf( $time_string,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() )
);
-
$posted_on = sprintf(
esc_html_x( 'Posted on %s', 'post date', 'understrap' ),
'' . $time_string . ''
);
-
$byline = sprintf(
esc_html_x( 'by %s', 'post author', 'understrap' ),
'' . esc_html( get_the_author() ) . ''
);
-
- echo '' . $posted_on . ' ' . $byline . '';
-
+ echo '' . $posted_on . ' ' . $byline . ''; // WPCS: XSS OK.
}
endif;
@@ -45,27 +40,24 @@ if ( ! function_exists( 'understrap_entry_footer' ) ) :
*/
function understrap_entry_footer() {
// Hide category and tag text for pages.
- if ( 'post' == get_post_type() ) {
+ if ( 'post' === get_post_type() ) {
/* translators: used between list items, there is a space after the comma */
- $categories_list = get_the_category_list( __( ', ', 'understrap' ) );
+ $categories_list = get_the_category_list( esc_html__( ', ', 'understrap' ) );
if ( $categories_list && understrap_categorized_blog() ) {
- printf( '' . __( 'Posted in %1$s', 'understrap' ) . '', $categories_list );
+ printf( '' . esc_html__( 'Posted in %1$s', 'understrap' ) . '', $categories_list ); // WPCS: XSS OK.
}
-
/* translators: used between list items, there is a space after the comma */
- $tags_list = get_the_tag_list( '', __( ', ', 'understrap' ) );
+ $tags_list = get_the_tag_list( '', esc_html__( ', ', 'understrap' ) );
if ( $tags_list ) {
- printf( '' . __( 'Tagged %1$s', 'understrap' ) . '', $tags_list );
+ printf( '' . esc_html__( 'Tagged %1$s', 'understrap' ) . '', $tags_list ); // WPCS: XSS OK.
}
}
-
if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
echo '';
}
-
- edit_post_link(
+ edit_post_link(
sprintf(
/* translators: %s: Name of current post */
esc_html__( 'Edit %s', 'understrap' ),