Make WordPress Core


Ignore:
Timestamp:
11/17/2016 06:01:13 PM (10 years ago)
Author:
SergeyBiryukov
Message:

Taxonomy: Prevent wp_list_categories() from producing not well-nested output if hide_title_if_empty is true.

Props chesio.
Fixes #38839. See #33460.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/category-template.php

    r38928 r39280  
    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>';
     629        }
    629630
    630631        /**
Note: See TracChangeset for help on using the changeset viewer.