Changeset 3002 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/routes/class-locale.php
- Timestamp:
- 04/25/2016 03:38:34 PM (10 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc
- Files:
-
- 1 added
- 1 copied
- 1 moved
-
. (added)
-
routes (moved) (moved from sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/routes)
-
routes/class-locale.php (copied) (copied from sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/routes/locale.php) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/routes/class-locale.php
r2999 r3002 1 1 <?php 2 2 3 namespace WordPressdotorg\GlotPress\Routes\Routes; 4 3 5 // wporg_get_plugin_icon() 4 if ( file_exists( WPORGPATH . 'extend/plugins-plugins/_plugin-icons.php' ) ) { 5 include_once WPORGPATH . 'extend/plugins-plugins/_plugin-icons.php'; 6 } 6 use GP; 7 use GP_Locales; 8 use GP_Route; 9 use stdClass; 7 10 8 11 /** … … 11 14 * Provides the route for translate.wordpress.org/locale/$locale. 12 15 */ 13 class WPorg_GP_Route_Locale extends GP_Route {16 class Locale extends GP_Route { 14 17 15 18 /** 16 19 * Prints projects/translation sets of a top level project. 17 20 * 18 * @param string $locale_slugSlug of the locale.19 * @param string $set_slugSlug of the translation set.20 * @param string $project_pathPath of a project.21 * @param string $locale_slug Slug of the locale. 22 * @param string $set_slug Slug of the translation set. 23 * @param bool|string $project_path Path of a project. 21 24 */ 22 25 public function get_locale_projects( $locale_slug, $set_slug = 'default', $project_path = false ) { … … 101 104 $project_ids = array_merge( 102 105 $project_ids, 103 $wpdb->get_col( "SELECT id FROM {$wpdb->gp_projects} WHERE parent_project_id IN( " . implode(', ', $project_ids ) . ")")106 $wpdb->get_col( "SELECT id FROM {$wpdb->gp_projects} WHERE parent_project_id IN( " . implode( ', ', $project_ids ) . ')' ) 104 107 ); 105 108 … … 192 195 } 193 196 194 switch ( $project->slug ) {197 switch ( $project->slug ) { 195 198 case 'wp': 196 199 return '<div class="wordpress-icon"><span class="dashicons dashicons-wordpress-alt"></span></div>'; 197 200 case 'meta': 198 switch ( $sub_project->slug ) {201 switch ( $sub_project->slug ) { 199 202 case 'forums': 200 203 return '<div class="default-icon"><span class="dashicons dashicons-format-chat"></span></div>';
Note: See TracChangeset
for help on using the changeset viewer.