Changeset 1760
- Timestamp:
- 07/20/2015 10:57:46 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/translate.wordpress.org/includes/gp-plugins/wporg-specifics.php
r1752 r1760 27 27 } 28 28 29 /** 30 * Natural sorting for sub projects. 31 */ 29 32 function projects( $sub_projects, $parent_id ) { 30 if ( 1 != $parent_id && 13 != $parent_id ) { // 1 = WordPress, 13 = BuddyPress 31 return $sub_projects; 33 if ( in_array( $parent_id, array( 1, 13, 58 ) ) ) { // 1 = WordPress, 13 = BuddyPress, 58 = bbPress 34 usort( $sub_projects, function( $a, $b ) { 35 return - strcasecmp( $a->name, $b->name ); 36 } ); 32 37 } 33 38 34 /* 35 * Natural sorting for sub projects. 36 * 37 * 3.0.x 38 * 4.0.x 39 * 3.1.x 40 * 4.1.x 41 * => 42 * 4.1.x 43 * 4.0.x 44 * 3.1.x 45 * 3.0.x 46 */ 47 usort( $sub_projects, function( $a, $b ) { 48 return - strcasecmp( $a->name, $b->name ); 49 }); 39 if ( in_array( $parent_id, array( 17, 523 ) ) ) { // 17 = Plugins, 523 = Themes 40 usort( $sub_projects, function( $a, $b ) { 41 return strcasecmp( $a->name, $b->name ); 42 } ); 43 } 50 44 51 45 return $sub_projects;
Note: See TracChangeset
for help on using the changeset viewer.