Changeset 21543
- Timestamp:
- 08/17/2012 10:18:01 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentytwelve/functions.php
r21542 r21543 315 315 316 316 // Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name. 317 if ( '' !=$tag_list ) {317 if ( $tag_list ) { 318 318 $utility_text = __( 'This entry was posted in %1$s and tagged %2$s on %3$s by %4$s.', 'twentytwelve' ); 319 } elseif ( ! empty( $categories_list ) && twentytwelve_is_categorized_site()) {319 } elseif ( $categories_list ) { 320 320 $utility_text = __( 'This entry was posted in %1$s on %3$s by %4$s.', 'twentytwelve' ); 321 321 } else { … … 333 333 endif; 334 334 335 if ( ! function_exists( 'twentytwelve_is_categorized_site' ) ) :336 /**337 * Returns true if a blog has more than one category.338 *339 * @since Twenty Twelve 1.0340 */341 function twentytwelve_is_categorized_site() {342 $non_empty_categories = get_categories( array(343 'hide_empty' => 1,344 ) );345 346 if ( is_wp_error( $non_empty_categories ) || empty( $non_empty_categories ) || count( $non_empty_categories ) < 1 )347 return false;348 349 return true;350 }351 endif;352 353 335 /** 354 336 * Extends the default WordPress body class to denote:
Note: See TracChangeset
for help on using the changeset viewer.