Changeset 10159
- Timestamp:
- 08/13/2020 02:43:12 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/locale-project.php
r9816 r10159 190 190 // Ensure consistent order of development and stable projects. 191 191 usort( $sub_projects, function( $a, $b ) { 192 return strnatcasecmp( $a->name, $b->name ); 192 $a_is_dev = ( substr( $a->slug, 0, 3 ) == 'dev' ); 193 $b_is_dev = ( substr( $b->slug, 0, 3 ) == 'dev' ); 194 195 // Sort same-type projects alphabetically 196 if ( $a_is_dev === $b_is_dev ) { 197 return strnatcasecmp( $a->name, $b->name ); 198 } 199 200 // Sort Stable before Dev. 201 return $a_is_dev <=> $b_is_dev; 193 202 } ); 194 203 }
Note: See TracChangeset
for help on using the changeset viewer.