%2$s';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string = ''. ' Updated on ' .'';
}
$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', 'blogbd' ),
//'' . $time_string . ''
'' . $time_string . ''
);
echo '' . $posted_on . '';
}
endif;
if ( ! function_exists( 'blogbd_posted_by' ) ) :
function blogbd_posted_by() {
$byline = sprintf(
esc_html_x( 'by %s', 'post author', 'blogbd' ),
'' . esc_html( get_the_author() ) . ''
);
echo ' ' . $byline . '';
}
endif;
if ( ! function_exists( 'blogbd_entry_footer' ) ) :
function blogbd_entry_footer() {
if ( 'post' === get_post_type() ) {
$categories_list = get_the_category_list( esc_html__( ', ', 'blogbd' ) );
if ( $categories_list && blogbd_categorized_blog() ) {
printf( '' . esc_html__( 'Posted in %1$s', 'blogbd' ) . '', $categories_list );
echo ' '; // blank space added
}
$tags_list = get_the_tag_list( '', esc_html__( ', ', 'blogbd' ) );
if ( $tags_list ) {
printf( '' . esc_html__( 'Tags: %1$s', 'blogbd' ) . '', $tags_list );
echo ' '; // blank space added
}
}
if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
echo '';
echo ' '; // blank space added
}
edit_post_link(
sprintf(
wp_kses(
__( 'Edit %s', 'blogbd' ),
array(
'span' => array(
'class' => array(),
),
)
),
get_the_title()
),
'',
''
);
}
endif;
function blogbd_categorized_blog() {
if ( false === ( $all_the_cool_cats = get_transient( 'blogbd_categories' ) ) ) {
$all_the_cool_cats = get_categories( array(
'fields' => 'ids',
'hide_empty' => 1,
'number' => 2,
) );
$all_the_cool_cats = count( $all_the_cool_cats );
set_transient( 'blogbd_categories', $all_the_cool_cats );
}
return $all_the_cool_cats > 1;
}
function blogbd_category_transient_flusher() {
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
return;
}
delete_transient( 'blogbd_categories' );
}
add_action( 'edit_category', 'blogbd_category_transient_flusher' );
add_action( 'save_post', 'blogbd_category_transient_flusher' );
?>