%2$s';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string = '';
}
$time_string = sprintf(
$time_string,
esc_attr( get_the_date( DATE_W3C ) ),
esc_html( get_the_date() ),
esc_attr( get_the_modified_date( DATE_W3C ) ),
esc_html( get_the_modified_date() )
);
printf(
'%1$s%3$s',
seedlet_get_icon_svg( 'calendar', 16 ),
esc_url( get_permalink() ),
$time_string
);
}
endif;
if ( ! function_exists( 'seedlet_posted_by' ) ) :
/**
* Prints HTML with meta information about theme author.
*/
function seedlet_posted_by() {
printf(
/* translators: 1: SVG icon. 2: post author, only visible to screen readers. 3: author link. */
'%1$s%2$s%4$s',
seedlet_get_icon_svg( 'person', 16 ),
__( 'Posted by', 'seedlet' ),
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
esc_html( get_the_author() )
);
}
endif;
if ( ! function_exists( 'seedlet_comment_count' ) ) :
/**
* Prints HTML with the comment count for the current post.
*/
function seedlet_comment_count() {
if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
echo '';
}
}
endif;
if ( ! function_exists( 'seedlet_entry_meta_header' ) ) :
/**
* Allow child themes to include meta in the header of the post
* by overwriting this function.
*/
function seedlet_entry_meta_header() {
/* Leaving this empty so child themes can optionally add entry-meta to the header */
}
endif;
if ( ! function_exists( 'seedlet_entry_meta_footer' ) ) :
/**
* Prints HTML with meta information for the categories, tags and comments.
*/
function seedlet_entry_meta_footer() {
// Hide author, post date, category and tag text for pages.
if ( 'post' === get_post_type() ) {
// Posted by
seedlet_posted_by();
// Posted on
seedlet_posted_on();
/* translators: used between list items, there is a space after the comma. */
$categories_list = get_the_category_list( __( ', ', 'seedlet' ) );
if ( $categories_list ) {
printf(
/* translators: 1: SVG icon. 2: posted in label, only visible to screen readers. 3: list of categories. */
'%1$s%2$s%3$s',
seedlet_get_icon_svg( 'category', 16 ),
__( 'Posted in', 'seedlet' ),
$categories_list
); // WPCS: XSS OK.
}
/* translators: used between list items, there is a space after the comma. */
$tags_list = get_the_tag_list( '', __( ', ', 'seedlet' ) );
if ( $tags_list ) {
printf(
/* translators: 1: SVG icon. 2: posted in label, only visible to screen readers. 3: list of tags. */
'%1$s%2$s%3$s',
seedlet_get_icon_svg( 'tag', 16 ),
__( 'Tags:', 'seedlet' ),
$tags_list
); // WPCS: XSS OK.
}
}
// Comment count.
if ( ! is_singular() ) {
seedlet_comment_count();
}
// Edit post link.
edit_post_link(
sprintf(
wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers. */
__( 'Edit %s', 'seedlet' ),
array(
'span' => array(
'class' => array(),
),
)
),
get_the_title()
),
'' . seedlet_get_icon_svg( 'edit', 16 ),
''
);
}
endif;
if ( ! function_exists( 'seedlet_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.
*/
function seedlet_post_thumbnail() {
if ( ! seedlet_can_show_post_thumbnail() ) {
return;
}
if ( is_singular() ) :
?>
%s', get_avatar( $id_or_email, seedlet_get_avatar_size() ) );
}
endif;
if ( ! function_exists( 'seedlet_the_post_navigation' ) ) :
/**
* Documentation for function.
*/
function seedlet_the_post_navigation() {
if ( is_singular( 'attachment' ) ) {
// Parent post navigation.
the_post_navigation(
array(
/* translators: %s: parent post link */
'prev_text' => sprintf( __( 'Published in%s', 'seedlet' ), '%title' ),
)
);
} elseif ( is_singular( 'post' ) ) {
// Previous/next post navigation.
the_post_navigation(
array(
'next_text' => '' . __( 'Next Post', 'seedlet' ) . ' ' .
'' . __( 'Next post:', 'seedlet' ) . '
' .
'%title',
'prev_text' => '' . __( 'Previous Post', 'seedlet' ) . ' ' .
'' . __( 'Previous post:', 'seedlet' ) . '
' .
'%title',
)
);
}
}
endif;
if ( ! function_exists( 'seedlet_the_posts_pagination' ) ) :
/**
* Documentation for function.
*/
function seedlet_the_posts_pagination() {
the_posts_pagination(
array(
'mid_size' => 2,
'prev_text' => sprintf(
'%s %s',
seedlet_get_icon_svg( 'chevron_left', 22 ),
__( 'Newer posts', 'seedlet' )
),
'next_text' => sprintf(
'%s %s',
__( 'Older posts', 'seedlet' ),
seedlet_get_icon_svg( 'chevron_right', 22 )
),
)
);
}
endif;