Changeset 4687
- Timestamp:
- 01/07/2007 02:10:50 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-functions.php
r4670 r4687 601 601 function return_categories_list( $parent = 0 ) { 602 602 global $wpdb; 603 return $wpdb->get_col( "SELECT cat_ID FROM $wpdb->categories WHERE category_parent = $parent ORDER BY category_count DESC" );603 return $wpdb->get_col( "SELECT cat_ID FROM $wpdb->categories WHERE category_parent = $parent AND ( link_count = 0 OR category_count != 0 ) ORDER BY category_count DESC" ); 604 604 } 605 605 … … 675 675 function return_link_categories_list( $parent = 0 ) { 676 676 global $wpdb; 677 return $wpdb->get_col( "SELECT cat_ID FROM $wpdb->categories WHERE category_parent = $parent ORDER BY link_count DESC" );677 return $wpdb->get_col( "SELECT cat_ID FROM $wpdb->categories WHERE category_parent = $parent AND (category_count = 0 OR link_count != 0) ORDER BY link_count DESC" ); 678 678 } 679 679
Note: See TracChangeset
for help on using the changeset viewer.