summaryrefslogtreecommitdiffstats
path: root/wp-admin/admin-ajax.php
diff options
context:
space:
mode:
authorryan <ryan@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-05-19 22:17:49 +0000
committerryan <ryan@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-05-19 22:17:49 +0000
commitbb785c8b708131cf80d8e9b8215f41a5196bd09b (patch)
treee1d65e7ec4f97a2f11ff8abb5b69bab565207821 /wp-admin/admin-ajax.php
parent80788a01b4ded035ff65ce65def9ad6f57822c89 (diff)
downloadwordpress-mu-bb785c8b708131cf80d8e9b8215f41a5196bd09b.tar.gz
wordpress-mu-bb785c8b708131cf80d8e9b8215f41a5196bd09b.tar.xz
wordpress-mu-bb785c8b708131cf80d8e9b8215f41a5196bd09b.zip
Put checked categories at the top of the checklist. Props mdawaffe. see #WP7000
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1299 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin/admin-ajax.php')
-rw-r--r--wp-admin/admin-ajax.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php
index 4e34333..663880e 100644
--- a/wp-admin/admin-ajax.php
+++ b/wp-admin/admin-ajax.php
@@ -150,6 +150,9 @@ case 'add-category' : // On the Fly
$parent = 0;
$post_category = isset($_POST['post_category'])? (array) $_POST['post_category'] : array();
$checked_categories = array_map( 'absint', (array) $post_category );
+ $popular_ids = isset( $_POST['popular_ids'] ) ?
+ array_map( 'absint', explode( ',', $_POST['popular_ids'] ) ) :
+ false;
$x = new WP_Ajax_Response();
foreach ( $names as $cat_name ) {
@@ -163,7 +166,7 @@ case 'add-category' : // On the Fly
continue;
$category = get_category( $cat_id );
ob_start();
- wp_category_checklist( 0, $cat_id, $checked_categories );
+ wp_category_checklist( 0, $cat_id, $checked_categories, $popular_ids );
$data = ob_get_contents();
ob_end_clean();
$x->add( array(