Changeset 11092 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/routes/class-locale.php
- Timestamp:
- 07/05/2021 05:52:38 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/routes/class-locale.php
r9616 r11092 61 61 // Grab the top level projects to show in the menu first, so as to be able to handle the default Waiting / WP tab selection 62 62 $top_level_projects = $this->get_active_top_level_projects(); 63 usort( $top_level_projects, array( $this, '_sort_reverse_name_callback' ) );64 63 65 64 // Default to the Waiting or WordPress tabs … … 968 967 parent_project_id IS NULL 969 968 AND active = 1 970 ORDER BY name ASC969 ORDER BY FIELD( slug, 'waiting', 'wp', 'wp-themes', 'wp-plugins', 'patterns', 'meta', 'apps' ) 971 970 " ); 972 }973 974 private function _sort_reverse_name_callback( $a, $b ) {975 // The Waiting project should always be first.976 if ( $a->slug == 'waiting' ) {977 return -1;978 }979 return - strcasecmp( $a->name, $b->name );980 971 } 981 972
Note: See TracChangeset
for help on using the changeset viewer.