wp-content/themes/twentyfifteen/inc/template-tags.php:159Determine whether blog/site has more than one category.
boolfunction twentyfifteen_categorized_blog() { $all_the_cool_cats = get_transient( 'twentyfifteen_categories' ); if ( false === $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, // 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. $all_the_cool_cats = count( $all_the_cool_cats ); set_transient( 'twentyfifteen_categories', $all_the_cool_cats ); } if ( $all_the_cool_cats > 1 || is_preview() ) { // This blog has more than 1 category so twentyfifteen_categorized_blog() should return true. return true; } else { // This blog has only 1 category so twentyfifteen_categorized_blog() should return false. return false; }}Introduced in Twenty Fifteen 1.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-content/themes/twentyfifteen/inc/template-tags.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.