_s: Formatting adjustments.

Improves readability of argument array and brings new comment in line with all other comments in this function.
This commit is contained in:
Konstantin Obenland 2014-03-24 10:17:59 -07:00
parent 7dc0ed3410
commit 9a6b539bba
1 changed files with 5 additions and 3 deletions

View File

@ -102,9 +102,11 @@ function _s_categorized_blog() {
if ( false === ( $all_the_cool_cats = get_transient( 'all_the_cool_cats' ) ) ) { if ( false === ( $all_the_cool_cats = get_transient( 'all_the_cool_cats' ) ) ) {
// Create an array of all the categories that are attached to posts. // Create an array of all the categories that are attached to posts.
$all_the_cool_cats = get_categories( array( $all_the_cool_cats = get_categories( array(
'hide_empty' => 1,
'fields' => 'ids', 'fields' => 'ids',
'number' => 2, // we only need to know if there is more than one category '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. // Count the number of categories that are attached to the posts.
@ -113,7 +115,7 @@ function _s_categorized_blog() {
set_transient( 'all_the_cool_cats', $all_the_cool_cats ); set_transient( 'all_the_cool_cats', $all_the_cool_cats );
} }
if ( '1' != $all_the_cool_cats ) { if ( $all_the_cool_cats > 1 ) {
// This blog has more than 1 category so _s_categorized_blog should return true. // This blog has more than 1 category so _s_categorized_blog should return true.
return true; return true;
} else { } else {