Ticket #21479: 21479.4.patch
| File 21479.4.patch, 1.3 KB (added by SergeyBiryukov, 9 months ago) |
|---|
-
wp-content/themes/twentytwelve/functions.php
314 314 ); 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 && 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 { 322 322 $utility_text = __( 'This entry was posted on %3$s by %4$s.', 'twentytwelve' ); … … 339 339 * @since Twenty Twelve 1.0 340 340 */ 341 341 function twentytwelve_is_categorized_site() { 342 $non_empty_categories = get_categories(array(342 $non_empty_categories = wp_count_terms( 'category', array( 343 343 'hide_empty' => 1, 344 344 ) ); 345 345 346 if ( is_wp_error( $non_empty_categories ) || empty( $non_empty_categories ) || count( $non_empty_categories ) < 1)346 if ( is_wp_error( $non_empty_categories ) || $non_empty_categories < 2 ) 347 347 return false; 348 348 349 349 return true;
