WordPress.org

Make WordPress Core

Ticket #38839: patch.diff

File patch.diff, 519 bytes (added by chesio, 4 years ago)

Proposed patch for #38839

  • wp-includes/category-template.php

    diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php
    index fab2640..7546f80 100644
    a b function wp_list_categories( $args = '' ) { 
    624624                $output .= walk_category_tree( $categories, $depth, $r );
    625625        }
    626626
    627         if ( $r['title_li'] && 'list' == $r['style'] )
     627        if ( $r['title_li'] && 'list' == $r['style'] && ( ! empty( $categories ) || ! $r['hide_title_if_empty'] ) )
    628628                $output .= '</ul></li>';
    629629
    630630        /**