Don't query for checked categories for new posts.
git-svn-id: http://svn.automattic.com/wordpress/trunk@7800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
eb9c8420db
commit
cad2447ddc
|
@ -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 ) {
|
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 ) );
|
$categories = get_terms( $taxonomy, array( 'orderby' => 'count', 'order' => 'DESC', 'number' => $number, 'hierarchical' => false ) );
|
||||||
|
|
||||||
$popular_ids = array();
|
$popular_ids = array();
|
||||||
|
|
Loading…
Reference in New Issue