WordPress.org

Make WordPress Core

Ticket #5462: invalid_nested_category_HTML_llist_in_admin.patch

File invalid_nested_category_HTML_llist_in_admin.patch, 1.2 KB (added by 082net, 6 years ago)
  • wp-admin/includes/template.php

     
    123123 
    124124function write_nested_categories( $categories ) { 
    125125        foreach ( $categories as $category ) { 
    126                 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>"; 
     126                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>"; 
    127127 
    128128                if ( $category['children'] ) { 
    129129                        echo "<ul>\n"; 
    130130                        write_nested_categories( $category['children'] ); 
    131131                        echo "</ul>\n"; 
    132132                } 
     133                echo "</li>"; 
    133134        } 
    134135} 
    135136