Make WordPress Core


Ignore:
Timestamp:
05/19/2008 09:35:18 PM (16 years ago)
Author:
ryan
Message:

Put checked categories at the top of the checlist. Props mdawaffe. fixes #7000 for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r7907 r7956  
    151151    $post_category = isset($_POST['post_category'])? (array) $_POST['post_category'] : array();
    152152    $checked_categories = array_map( 'absint', (array) $post_category );
     153    $popular_ids = isset( $_POST['popular_ids'] ) ?
     154            array_map( 'absint', explode( ',', $_POST['popular_ids'] ) ) :
     155            false;
    153156
    154157    $x = new WP_Ajax_Response();
     
    164167        $category = get_category( $cat_id );
    165168        ob_start();
    166             wp_category_checklist( 0, $cat_id, $checked_categories );
     169            wp_category_checklist( 0, $cat_id, $checked_categories, $popular_ids );
    167170        $data = ob_get_contents();
    168171        ob_end_clean();
Note: See TracChangeset for help on using the changeset viewer.