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 ) return true; return false; } /** * Flush out the transients used in delicacy_categorized_blog */ function delicacy_category_transient_flusher() { // Like, beat it. Dig? delete_transient( 'all_the_cool_cats' ); } add_action( 'edit_category', 'delicacy_category_transient_flusher' ); add_action( 'save_post', 'delicacy_category_transient_flusher' ); /** * Filters wp_title to print a neat tag based on what is being viewed. * * @since Delicacy 1.1.1 */ function delicacy_wp_title( $title, $sep ) { global $page, $paged; if ( is_feed() ) return $title; // Add the blog name $title .= get_bloginfo( 'name' ); // Add the blog description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) $title .= " $sep $site_description"; // Add a page number if necessary: if ( $paged >= 2 || $page >= 2 ) $title .= " $sep " . sprintf( __( 'Page %s', 'delicacy' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'delicacy_wp_title', 10, 2 );