WordPress.org

Make WordPress Core

Changeset 4548


Ignore:
Timestamp:
11/30/06 00:22:18 (7 years ago)
Author:
matt
Message:

Always put checked categories first.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-functions.php

    r4543 r4548  
    599599 
    600600function sort_cats( $cat1, $cat2 ) { 
    601     return strcasecmp( $cat1['cat_name'], $cat2['cat_name'] ); 
     601    if ( $cat1['checked'] || $cat2['checked'] ) 
     602        return ( $cat1['checked'] && !$cat2['checked'] ) ? -1 : 1; 
     603    else 
     604        return strcasecmp( $cat1['cat_name'], $cat2['cat_name'] ); 
    602605} 
    603606 
Note: See TracChangeset for help on using the changeset viewer.