Make WordPress Core


Ignore:
Timestamp:
01/10/2008 10:42:49 PM (14 years ago)
Author:
matt
Message:

Fixes to category list saving. Hat tip: mdawaffe. Fixes #5631

File:
1 edited

Legend:

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

    r6591 r6597  
    189189
    190190function wp_popular_categories_checklist( $default = 0, $number = 10 ) {
    191     global $checked_categories;
    192 
    193     wp_set_checked_post_categories( $default );
    194 
    195191    $categories = get_categories( array( 'orderby' => 'count', 'order' => 'DESC', 'number' => $number ) );
    196192
    197193    foreach ( (array) $categories as $category ) {
    198194        $id = "popular-category-$category->term_id";
    199         $checked = in_array( $category->term_id, $checked_categories ) ? ' checked="checked"' : '';     
    200195        ?>
    201196
    202197        <li id="<?php echo $id; ?>">
    203198            <label class="selectit" for="in-<?php echo $id; ?>">
    204                 <input id="in-<?php echo $id; ?>" type="checkbox" name="post_category[]" value="<?php echo (int) $category->term_id; ?>"<?php echo $checked; ?> />
     199                <input id="in-<?php echo $id; ?>" type="checkbox" value="<?php echo (int) $category->term_id; ?>" />
    205200                <?php echo wp_specialchars( apply_filters( 'the_category', $category->name ) ); ?>
    206201            </label>
Note: See TracChangeset for help on using the changeset viewer.