forked from mirror/_s
_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:
parent
7dc0ed3410
commit
9a6b539bba
|
@ -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(
|
||||
'hide_empty' => 1,
|
||||
'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.
|
||||
|
@ -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 {
|
||||
|
|
Reference in New Issue