Changeset 2280 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/routes/index.php
- Timestamp:
- 01/12/2016 05:44:47 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/routes/index.php
r2109 r2280 7 7 class WPorg_GP_Route_Index extends GP_Route { 8 8 9 private $cache_group = 'wporg-translate'; 10 9 11 /** 10 12 * Prints all exisiting locales as cards. 13 * 14 * Note: Cache gets refreshed via `WPorg_GP_CLI_Update_Caches`. 11 15 */ 12 16 public function get_locales() { 17 $existing_locales = wp_cache_get( 'existing-locales', $this->cache_group ); 18 if ( false === $existing_locales ) { 19 $existing_locales = array(); 20 } 21 13 22 $locales = array(); 14 $existing_locales = GP::$translation_set->existing_locales();15 23 foreach ( $existing_locales as $locale ) { 16 24 $locales[] = GP_Locales::by_slug( $locale ); … … 19 27 unset( $existing_locales ); 20 28 21 $contributors_count = wp_cache_get( 'contributors-count', 'wporg-translate');29 $contributors_count = wp_cache_get( 'contributors-count', $this->cache_group ); 22 30 if ( false === $contributors_count ) { 23 31 $contributors_count = array(); 24 32 } 25 33 26 $translation_status = wp_cache_get( 'translation-status', 'wporg-translate');34 $translation_status = wp_cache_get( 'translation-status', $this->cache_group ); 27 35 if ( false === $translation_status ) { 28 36 $translation_status = array();
Note: See TracChangeset
for help on using the changeset viewer.