Always put checked categories first.

git-svn-id: https://develop.svn.wordpress.org/trunk@4548 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2006-11-30 00:22:18 +00:00
parent 1950f6ec7b
commit aae9c4b07f
1 changed files with 4 additions and 1 deletions

View File

@ -598,7 +598,10 @@ function return_categories_list( $parent = 0 ) {
}
function sort_cats( $cat1, $cat2 ) {
return strcasecmp( $cat1['cat_name'], $cat2['cat_name'] );
if ( $cat1['checked'] || $cat2['checked'] )
return ( $cat1['checked'] && !$cat2['checked'] ) ? -1 : 1;
else
return strcasecmp( $cat1['cat_name'], $cat2['cat_name'] );
}
function get_nested_categories( $default = 0, $parent = 0 ) {