Changeset 21444
- Timestamp:
- 08/05/2012 11:04:32 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentytwelve/functions.php
r21428 r21444 317 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 ( '' != $categories_list ) {319 } elseif ( '' != $categories_list && twentytwelve_is_categorized_site() ) { 320 320 $utility_text = __( 'This entry was posted in %1$s on %3$s by %4$s.', 'twentytwelve' ); 321 321 } else { … … 334 334 335 335 /** 336 * Returns true if a blog has more than one category. 337 * 338 * @since Twenty Twelve 1.0 339 */ 340 function twentytwelve_is_categorized_site() { 341 $non_empty_categories = get_categories( array( 342 'hide_empty' => 1, 343 ) ); 344 345 if ( is_wp_error( $non_empty_categories ) || empty( $non_empty_categories ) || count( $non_empty_categories ) < 1 ) 346 return false; 347 348 return true; 349 } 350 351 /** 336 352 * Extends the default WordPress body class to denote: 337 353 * 1. Using a full-width layout, when no active widgets in the sidebar
Note: See TracChangeset
for help on using the changeset viewer.