From 9a6b539bba488d5348324133f050ff82369b1d08 Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Mon, 24 Mar 2014 10:17:59 -0700 Subject: [PATCH] _s: Formatting adjustments. Improves readability of argument array and brings new comment in line with all other comments in this function. --- inc/template-tags.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/inc/template-tags.php b/inc/template-tags.php index 3c95df04..890c7152 100644 --- a/inc/template-tags.php +++ b/inc/template-tags.php @@ -102,9 +102,11 @@ function _s_categorized_blog() { if ( false === ( $all_the_cool_cats = get_transient( 'all_the_cool_cats' ) ) ) { // Create an array of all the categories that are attached to posts. $all_the_cool_cats = get_categories( array( + 'fields' => 'ids', 'hide_empty' => 1, - 'fields' => 'ids', - 'number' => 2, // we only need to know if there is more than one category + + // 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. @@ -113,7 +115,7 @@ function _s_categorized_blog() { 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. return true; } else {