'; // phpcs:ignore WordPress.Security.EscapeOutput
}
// Posted on.
twenty_twenty_one_posted_on();
// Edit post link.
edit_post_link(
sprintf(
/* translators: %s: Name of current post. Only visible to screen readers. */
esc_html__( 'Edit %s', 'twentytwentyone' ),
'' . get_the_title() . ''
),
'',
' '
);
if ( has_category() || has_tag() ) {
echo '
';
/* translators: used between list items, there is a space after the comma. */
$categories_list = get_the_category_list( __( ', ', 'twentytwentyone' ) );
if ( $categories_list ) {
printf(
/* translators: %s: list of categories. */
'' . esc_html__( 'Categorized as %s', 'twentytwentyone' ) . ' ',
$categories_list // phpcs:ignore WordPress.Security.EscapeOutput
);
}
/* translators: used between list items, there is a space after the comma. */
$tags_list = get_the_tag_list( '', __( ', ', 'twentytwentyone' ) );
if ( $tags_list ) {
printf(
/* translators: %s: list of tags. */
'' . esc_html__( 'Tagged %s', 'twentytwentyone' ) . '',
$tags_list // phpcs:ignore WordPress.Security.EscapeOutput
);
}
echo '
';
}
} else {
echo '
';
// Posted on.
twenty_twenty_one_posted_on();
// Posted by.
twenty_twenty_one_posted_by();
// Edit post link.
edit_post_link(
sprintf(
/* translators: %s: Name of current post. Only visible to screen readers. */
esc_html__( 'Edit %s', 'twentytwentyone' ),
'' . get_the_title() . ''
),
'',
''
);
echo '
';
if ( has_category() || has_tag() ) {
echo '
';
/* translators: used between list items, there is a space after the comma. */
$categories_list = get_the_category_list( __( ', ', 'twentytwentyone' ) );
if ( $categories_list ) {
printf(
/* translators: %s: list of categories. */
'' . esc_html__( 'Categorized as %s', 'twentytwentyone' ) . ' ',
$categories_list // phpcs:ignore WordPress.Security.EscapeOutput
);
}
/* translators: used between list items, there is a space after the comma. */
$tags_list = get_the_tag_list( '', __( ', ', 'twentytwentyone' ) );
if ( $tags_list ) {
printf(
/* translators: %s: list of tags. */
'' . esc_html__( 'Tagged %s', 'twentytwentyone' ) . '',
$tags_list // phpcs:ignore WordPress.Security.EscapeOutput
);
}
echo '
';
}
}
}
}
if ( ! function_exists( 'twenty_twenty_one_post_thumbnail' ) ) {
/**
* Displays an optional post thumbnail.
*
* Wraps the post thumbnail in an anchor element on index views, or a div
* element when on single views.
*
* @since 1.0.0
*
* @return void
*/
function twenty_twenty_one_post_thumbnail() {
if ( ! twenty_twenty_one_can_show_post_thumbnail() ) {
return;
}
?>
'eager' ) );
?>
labels ) &&
property_exists( $post_type->labels, 'name' )
) {
$post_type_name = $post_type->labels->name;
}
the_posts_pagination(
array(
/* translators: There is a space after page. */
'before_page_number' => esc_html__( 'Page ', 'twentytwentyone' ),
'mid_size' => 0,
'prev_text' => sprintf(
'%s %s',
is_rtl() ? twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' ) : twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ),
sprintf(
/* translators: %s: The post-type name. */
esc_html__( 'Newer %s', 'twentytwentyone' ),
'' . esc_html( $post_type_name ) . ''
)
),
'next_text' => sprintf(
'%s %s',
sprintf(
/* translators: %s: The post-type name. */
esc_html__( 'Older %s', 'twentytwentyone' ),
'' . esc_html( $post_type_name ) . ''
),
is_rtl() ? twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ) : twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' )
),
)
);
}
}