Merge branch 'pr/437'

Conflicts:
	inc/template-tags.php
This commit is contained in:
Konstantin Obenland 2014-03-30 12:02:05 -07:00
commit 74e9b10a7a
1 changed files with 4 additions and 4 deletions

View File

@ -99,7 +99,7 @@ endif;
* Returns true if a blog has more than 1 category.
*/
function _s_categorized_blog() {
if ( false === ( $all_the_cool_cats = get_transient( 'all_the_cool_cats' ) ) ) {
if ( false === ( $all_the_cool_cats = get_transient( '_s_categories' ) ) ) {
// Create an array of all the categories that are attached to posts.
$all_the_cool_cats = get_categories( array(
'fields' => 'ids',
@ -112,7 +112,7 @@ function _s_categorized_blog() {
// 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 );
set_transient( '_s_categories', $all_the_cool_cats );
}
if ( $all_the_cool_cats > 1 ) {
@ -129,7 +129,7 @@ function _s_categorized_blog() {
*/
function _s_category_transient_flusher() {
// Like, beat it. Dig?
delete_transient( 'all_the_cool_cats' );
delete_transient( '_s_categories' );
}
add_action( 'edit_category', '_s_category_transient_flusher' );
add_action( 'save_post', '_s_category_transient_flusher' );