Make WordPress Core

Ticket #39531: 39531.2.diff

File 39531.2.diff, 1.7 KB (added by lancewillett, 8 years ago)
  • wp-content/themes/twentyfifteen/inc/template-tags.php

     
    150150                set_transient( 'twentyfifteen_categories', $all_the_cool_cats );
    151151        }
    152152
    153         if ( $all_the_cool_cats > 1 ) {
     153        if ( $all_the_cool_cats > 1 || is_preview() ) {
    154154                // This blog has more than 1 category so twentyfifteen_categorized_blog should return true.
    155155                return true;
    156156        } else {
  • wp-content/themes/twentyfourteen/inc/template-tags.php

     
    140140                set_transient( 'twentyfourteen_category_count', $all_the_cool_cats );
    141141        }
    142142
    143         if ( 1 !== (int) $all_the_cool_cats ) {
     143        if ( $all_the_cool_cats > 1 || is_preview() ) {
    144144                // This blog has more than 1 category so twentyfourteen_categorized_blog should return true
    145145                return true;
    146146        } else {
  • wp-content/themes/twentyseventeen/inc/template-tags.php

     
    178178                set_transient( 'twentyseventeen_categories', $category_count );
    179179        }
    180180
     181        // Allow viewing case of 0 or 1 categories in post preview.
     182        if ( is_preview() ) {
     183                return true;
     184        }
     185
    181186        return $category_count > 1;
    182187}
    183188