Changeset 9616 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/routes/class-index.php
- Timestamp:
- 03/22/2020 12:05:56 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/routes/class-index.php
r3002 r9616 5 5 use GP_Locales; 6 6 use GP_Route; 7 use WordPressdotorg\GlotPress\Routes\Plugin; 7 8 8 9 /** … … 13 14 class Index extends GP_Route { 14 15 15 private $cache_group = 'wporg-translate';16 17 16 /** 18 17 * Prints all exisiting locales as cards. 19 *20 * Note: Cache gets refreshed via `WPorg_GP_CLI_Update_Caches`.21 18 */ 22 19 public function get_locales() { 23 $existing_locales = wp_cache_get( 'existing-locales', $this->cache_group ); 24 if ( false === $existing_locales ) { 25 $existing_locales = array(); 26 } 20 $existing_locales = Plugin::get_existing_locales(); 27 21 28 22 $locales = array(); … … 33 27 unset( $existing_locales ); 34 28 35 $contributors_count = wp_cache_get( 'contributors-count', $this->cache_group ); 36 if ( false === $contributors_count ) { 37 $contributors_count = array(); 38 } 39 40 $translation_status = wp_cache_get( 'translation-status', $this->cache_group ); 41 if ( false === $translation_status ) { 42 $translation_status = array(); 43 } 29 $contributors_count = Plugin::get_contributors_count(); 30 $translation_status = Plugin::get_translation_status(); 44 31 45 32 $this->tmpl( 'index-locales', get_defined_vars() );
Note: See TracChangeset
for help on using the changeset viewer.