%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 = $time_string;
$byline = '' . esc_html( get_the_author() ) . '';
echo '' . $byline . ' ' . $posted_on . '';
/* translators: used between list items, there is a space after the comma */
$tags_list = get_the_tag_list( '#', ' #', '' );
if ( $tags_list ) {
echo ' ' . $tags_list . '';
}
}
}
}
if ( ! function_exists( 'billie_entry_footer' ) ) {
/**
* Prints HTML with meta information for the categories, tags and comments.
*/
function billie_entry_footer() {
if ( ! get_theme_mod( 'billie_hide_meta' ) ) {
echo '';
}
}
} // End if().
if ( ! function_exists( 'billie_portfolio_footer' ) ) {
/**
* Prints HTML with meta information for the categories, tags and comments.
*/
function billie_portfolio_footer() {
if ( ! get_theme_mod( 'billie_hide_meta' ) ) {
echo '';
}
}
}
/* Excerpts */
function billie_excerpt_more( $more ) {
global $id;
return '… ' . billie_continue_reading( $id );
}
add_filter( 'excerpt_more', 'billie_excerpt_more',100 );
function billie_custom_excerpt_more( $output ) {
if ( has_excerpt() && ! is_attachment() ) {
global $id;
$output .= ' ' . billie_continue_reading( $id ); // insert a blank space.
}
return $output;
}
add_filter( 'get_the_excerpt', 'billie_custom_excerpt_more',100 );
function billie_continue_reading( $id ) {
return '' . sprintf( __( 'Continue Reading %s', 'billie' ), get_the_title( $id ) ) . '';
}
/**
* Returns true if a blog has more than 1 category.
*
* @return bool
*/
function billie_categorized_blog() {
if ( false === ( $all_the_cool_cats = get_transient( 'billie_categories' ) ) ) {
// Create an array of all the categories that are attached to posts.
$all_the_cool_cats = get_categories( array(
'fields' => 'ids',
'hide_empty' => 1,
// We only need to know if there is more than one category.
'number' => 2,
) );
// Count the number of categories that are attached to the posts.
$all_the_cool_cats = count( $all_the_cool_cats );
set_transient( 'billie_categories', $all_the_cool_cats );
}
if ( $all_the_cool_cats > 1 ) {
// This blog has more than 1 category so billie_categorized_blog should return true.
return true;
} else {
// This blog has only 1 category so billie_categorized_blog should return false.
return false;
}
}
/**
* Flush out the transients used in billie_categorized_blog.
*/
function billie_category_transient_flusher() {
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
return;
}
// Like, beat it. Dig?
delete_transient( 'billie_categories' );
}
add_action( 'edit_category', 'billie_category_transient_flusher' );
add_action( 'save_post', 'billie_category_transient_flusher' );