Don't query for checked categories for new posts.

git-svn-id: https://develop.svn.wordpress.org/trunk@7800 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-04-24 00:54:27 +00:00
parent 8bc2920aae
commit a659bd3878
1 changed files with 5 additions and 0 deletions

View File

@ -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();