From a659bd38784a13386b3e4234db8ea1a0474e61bc Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 24 Apr 2008 00:54:27 +0000 Subject: [PATCH] Don't query for checked categories for new posts. git-svn-id: https://develop.svn.wordpress.org/trunk@7800 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/template.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 17174208f5..8833c87e09 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -176,6 +176,11 @@ function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $select } function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10 ) { + global $post_ID; + if ( $post_ID ) + $checked_categories = wp_get_post_categories($post_ID); + else + $checked_categories = array(); $categories = get_terms( $taxonomy, array( 'orderby' => 'count', 'order' => 'DESC', 'number' => $number, 'hierarchical' => false ) ); $popular_ids = array();