mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-05 02:10:45 +01:00
Invalid HTML in nested category checkbox list. Also cleans up source formatting a bit. Fixes #5462. Hat tip: 082net.
git-svn-id: http://svn.automattic.com/wordpress/trunk@6392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0cbe2f0d84
commit
13ad107f4d
@ -159,13 +159,14 @@ function get_nested_categories( $default = 0, $parent = 0 ) {
|
||||
|
||||
function write_nested_categories( $categories ) {
|
||||
foreach ( $categories as $category ) {
|
||||
echo '<li id="category-', $category['cat_ID'], '"><label for="in-category-', $category['cat_ID'], '" class="selectit"><input value="', $category['cat_ID'], '" type="checkbox" name="post_category[]" id="in-category-', $category['cat_ID'], '"', ($category['checked'] ? ' checked="checked"' : "" ), '/> ', wp_specialchars( apply_filters('the_category', $category['cat_name'] )), "</label></li>";
|
||||
echo "\n", '<li id="category-', $category['cat_ID'], '"><label for="in-category-', $category['cat_ID'], '" class="selectit"><input value="', $category['cat_ID'], '" type="checkbox" name="post_category[]" id="in-category-', $category['cat_ID'], '"', ($category['checked'] ? ' checked="checked"' : "" ), '/> ', wp_specialchars( apply_filters('the_category', $category['cat_name'] )), '</label>';
|
||||
|
||||
if ( $category['children'] ) {
|
||||
echo "<ul>\n";
|
||||
echo "\n<ul>";
|
||||
write_nested_categories( $category['children'] );
|
||||
echo "</ul>\n";
|
||||
echo "\n</ul>";
|
||||
}
|
||||
echo '</li>';
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user