mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-07 09:49:04 +00:00
Taxonomy: Prevent wp_list_categories() from producing not well-nested output if hide_title_if_empty is true.
Props chesio. Fixes #38839. See #33460. git-svn-id: https://develop.svn.wordpress.org/trunk@39280 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -624,8 +624,9 @@ function wp_list_categories( $args = '' ) {
|
||||
$output .= walk_category_tree( $categories, $depth, $r );
|
||||
}
|
||||
|
||||
if ( $r['title_li'] && 'list' == $r['style'] )
|
||||
if ( $r['title_li'] && 'list' == $r['style'] && ( ! empty( $categories ) || ! $r['hide_title_if_empty'] ) ) {
|
||||
$output .= '</ul></li>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters the HTML output of a taxonomy list.
|
||||
|
||||
Reference in New Issue
Block a user