forked from mirror/_s
Merge pull request #445 from Automattic/speedy-cool-cats
_s: Optimize `_s_categorized_blog()`.
This commit is contained in:
commit
7dc0ed3410
|
@ -103,6 +103,8 @@ function _s_categorized_blog() {
|
||||||
// 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,
|
'hide_empty' => 1,
|
||||||
|
'fields' => 'ids',
|
||||||
|
'number' => 2, // we only need to know if there is more than one category
|
||||||
) );
|
) );
|
||||||
|
|
||||||
// Count the number of categories that are attached to the posts.
|
// Count the number of categories that are attached to the posts.
|
||||||
|
|
Reference in New Issue