', 'adelle' ),
esc_url( get_permalink() ),
esc_attr( get_the_time() ),
esc_attr( get_the_date( 'j' ) ),
esc_attr( get_the_date( 'M' ) ),
esc_attr( get_the_date( 'Y' ) ),
esc_html( get_the_date() )
);
}
endif;
if ( ! function_exists( 'adelle_posted_on' ) ) :
/**
* Prints HTML with meta information for the current post-date/time and author.
*
* @since Adelle 1.0
*/
function adelle_posted_on() {
printf( __( 'by %7$s', 'adelle' ),
esc_url( get_permalink() ),
esc_attr( get_the_time() ),
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
esc_attr( sprintf( __( 'View all posts by %s', 'adelle' ), get_the_author() ) ),
get_the_author()
);
}
endif;
/**
* Prints out HTML with metadata for the current post
*
* @since Adelle 1.0
*/
function adelle_post_meta() {
if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( __( ', ', 'adelle' ) );
if ( $categories_list && adelle_categorized_blog() ) :
?>
%3$s', 'adelle' ),
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
esc_attr( sprintf( __( 'View all posts by %s', 'adelle' ), get_the_author() ) ),
get_the_author()
);
?>
1,
) );
// Count the number of categories that are attached to the posts
$all_the_cool_cats = is_countable( $all_the_cool_cats ) ? count( $all_the_cool_cats ) : 0;
set_transient( 'all_the_cool_cats', $all_the_cool_cats );
}
if ( '1' != $all_the_cool_cats ) {
// This blog has more than 1 category so adelle_categorized_blog should return true
return true;
} else {
// This blog has only 1 category so adelle_categorized_blog should return false
return false;
}
}
/**
* Flush out the transients used in adelle_categorized_blog
*/
function adelle_category_transient_flusher() {
// Like, beat it. Dig?
delete_transient( 'all_the_cool_cats' );
}
add_action( 'edit_category', 'adelle_category_transient_flusher' );
add_action( 'save_post', 'adelle_category_transient_flusher' );