*/
echo '' . $tags_list . '' ; // WPCS: XSS OK.
}
}
}
endif;
if ( ! function_exists( 'algori_blogger_post_thumbnail' ) ) :
/**
* Displays an optional post thumbnail.
*
* Wraps the post thumbnail in a and anchor elements on index views, or a
* element when on single views.
*/
function algori_blogger_post_thumbnail() {
if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {
return;
}
if ( is_singular() ) :
?>
the_title_attribute( array(
'echo' => false,
) ),
) );
?>
%2$s';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string = '';
}
$time_string = sprintf( $time_string,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date( 'j F Y' ) ),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date( 'j F Y' ) )
);
$posted_on = '' . $time_string . ''; /* post date. */
echo '' . $posted_on . ''; // WPCS: XSS OK.
}
endif;
if ( ! function_exists( 'algori_blogger_post_category' ) ) :
/**
* Prints comma seperated post categories for pages.
*/
function algori_blogger_post_category() {
if ( 'post' === get_post_type() ) {
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( esc_html__( ', ', 'algori-blogger' ) );
if ( $categories_list ) {
/* list of categories. */
echo '' . $categories_list . '' ; // WPCS: XSS OK.
}
}
}
endif;
if ( ! function_exists( 'algori_blogger_posted_author' ) ) :
/**
* Prints HTML with meta information for the current post author.
*/
function algori_blogger_posted_author() {
/* post author. */
$byline = '' . esc_html( get_the_author() ) . '';
echo ' ' . $byline . ''; // WPCS: XSS OK.
}
endif;
if ( ! function_exists( 'algori_blogger_post_comments_count' ) ) :
/**
* Prints count of post comments.
*/
function algori_blogger_post_comments_count() {
if( ! post_password_required() && ( comments_open() || get_comments_number() ) ){
$post_comments_count_number = get_comments_number();
$post_comments_count = sprintf(
/* translators: 1: comment count number */
esc_html( _nx( '%1$s Comment ', '%1$s Comments ', $post_comments_count_number, 'comment count number', 'algori-blogger' ) ),
number_format_i18n( $post_comments_count_number )
);
echo ''; // WPCS: XSS OK.
}
}
endif;
if ( ! function_exists( 'algori_blogger_post_edit_link' ) ) :
/**
* Prints post edit link.
*/
function algori_blogger_post_edit_link() {
edit_post_link(
sprintf(
wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers */
__( 'Edit Post %s', 'algori-blogger' ),
array(
'span' => array(
'class' => array(),
),
)
),
get_the_title()
),
'',
''
);
}
endif;