mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 19:46:21 +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. Built from https://develop.svn.wordpress.org/trunk@39280 git-svn-id: http://core.svn.wordpress.org/trunk@39220 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5e88248a44
commit
480501c6a8
@ -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.
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-beta4-39279';
|
||||
$wp_version = '4.7-beta4-39280';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
x
Reference in New Issue
Block a user