Always put checked categories first.

git-svn-id: http://svn.automattic.com/wordpress/trunk@4548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt 2006-11-30 00:22:18 +00:00
parent 1097f574c1
commit b16435a39a
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 ) {