%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() ),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() )
);
$posted_on = sprintf(
esc_html_x( '%s', 'post date', 'sagablog-light' ),
'' . $time_string .''
);
echo '' . $posted_on . ''; // WPCS: XSS OK.
}
endif;
/************************************************************************/
if ( ! function_exists( 'sagablog_category' ) ) :
/**
* Prints HTML with meta information for the categories.
*/
function sagablog_category() {
// Hide category and tag text for pages.
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__( ' ', 'sagablog-light' ) );
if ( $categories_list && sagablog_categorized_blog() ) {
printf( '' . esc_html__( '%1$s', 'sagablog-light' ) . '', $categories_list ); // WPCS: XSS OK.
}
}
}
endif;
/************************************************************************/
if ( ! function_exists( 'sagablog_category_5' ) ) :
/**
* Prints HTML with meta information for the categories.
*/
function sagablog_category_5() {
// Hide category and tag text for pages.
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__( ', ', 'sagablog-light' ) );
//Show not more then 5 category
$findme = ',';
$pos = mb_substr_count($categories_list, $findme)+1;
if ($pos>5){$pos=5;}
$categories_list_array = explode(",", $categories_list);
$categories_list_array_new = array_chunk($categories_list_array, $pos);
$categories_list_back = implode(" ", $categories_list_array_new[0]);
if ( $categories_list && sagablog_categorized_blog() ) {
printf( '
' . esc_html__( '%1$s', 'sagablog-light' ) . '
', $categories_list_back ); // WPCS: XSS OK.
}
}
}
endif;
/************************************************************************/
if ( ! function_exists( 'sagablog_meta_data' ) ) :
/**
* Prints HTML with meta information for author, comments and edit link.
*/
function sagablog_meta_data() {
$byline = sprintf(
esc_html_x( 'Posted by %s', 'post author', 'sagablog-light' ),
'' . esc_html( get_the_author() ) . ''
);
echo '
';
echo ' ' . $byline . ''; // WPCS: XSS OK.
if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
echo '';
/* translators: %s: post title */
comments_popup_link( sprintf( wp_kses( __( 'Leave a Comment on %s', 'sagablog-light' ), array( 'span' => array( 'class' => array() ) ) ), get_the_title() ) );
echo '';
}
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
esc_html__( 'Edit %s', 'sagablog-light' ),
the_title( '"', '"', false )
),
'',
''
);
//Add social share links
$sagablog_share_links_options=esc_html(get_theme_mod( 'sagablog_social_share_links_options', 'share-posts' ));
if ($sagablog_share_links_options==='share-posts' || $sagablog_share_links_options==='share-posts-pages'){
get_template_part( 'inc/share', 'links' );
}
echo '
';
}
endif;
/************************************************************************/
if ( ! function_exists( 'sagablog_tags' ) ) :
/**
* Prints HTML with meta information for tags.
*/
function sagablog_tags() {
// Hide category and tag text for pages.
if ( 'post' === get_post_type() ) {
/* translators: used between list items, there is a space after the comma */
$tags_list = get_the_tag_list( '', esc_html__( ' ', 'sagablog-light' ) );
if ( $tags_list ) {
printf( '