1,
) );
// Count the number of categories that are attached to the posts
$all_the_cool_cats = count( $all_the_cool_cats );
set_transient( 'all_the_cool_cats', $all_the_cool_cats );
}
if ( '1' != $all_the_cool_cats ) {
// This blog has more than 1 category so albinomouse_categorized_blog should return true
return true;
} else {
// This blog has only 1 category so albinomouse_categorized_blog should return false
return false;
}
}
/**
* Flush out the transients used in albinomouse_categorized_blog
* @since AlbinoMouse 1.0
*/
function albinomouse_category_transient_flusher() {
// Like, beat it. Dig?
delete_transient( 'all_the_cool_cats' );
}
add_action( 'edit_category', 'albinomouse_category_transient_flusher' );
add_action( 'save_post', 'albinomouse_category_transient_flusher' );