Changeset 8256
- Timestamp:
- 02/15/2019 07:16:16 AM (6 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/stats-plugin-themes-overview.php
r8249 r8256 5 5 $breadcrumb = array(); 6 6 $breadcrumb[] = gp_link_get( '/stats', __( 'Locale Stats' ) ); 7 $breadcrumb[] = gp_link_get( '/locale s/' . $locale . '/' . $locale_slug, $gp_locale->native_name );7 $breadcrumb[] = gp_link_get( '/locale/' . $locale . '/' . $locale_slug, $gp_locale->english_name ); 8 8 $breadcrumb[] = trim( ucwords( $view ), 's' ) . ' translation status overview'; 9 9 gp_breadcrumb( $breadcrumb ); -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/routes/class-stats.php
r8249 r8256 195 195 } 196 196 197 if ( 198 'plugins' == $view && 199 ( 200 ! GP::$project->by_path( $items[$slug]->project->path . '/dev' ) 201 && 202 ! GP::$project->by_path( $items[$slug]->project->path . '/stable' ) 203 ) 204 ) { 205 // Not all top plugins are translation-aware, lets just skip those.. 206 unset( $items[ $slug ] ); 207 continue; 208 } 209 210 $project_ids[ $items[$slug]->project->id ] = $slug; 197 if ( 'plugins' == $view ) { 198 // For plugins, we're ignoring the Readme projects as they're not immediately useful. 199 // The display will use the "Code Stable" if present, else "Code Development" 200 $code_project = 201 GP::$project->by_path( 'wp-' . $view . '/' . $slug . '/stable' ) ?: 202 GP::$project->by_path( 'wp-' . $view . '/' . $slug . '/dev' ); 203 204 // No code project? This happens when the plugin isn't translatable. The readme projects still exist though. 205 if ( ! $code_project ) { 206 unset( $items[ $slug ] ); 207 continue; 208 } 209 210 $project_ids[ $code_project->id ] = $slug; 211 } else { 212 $project_ids[ $items[$slug]->project->id ] = $slug; 213 } 211 214 } 212 215 … … 219 222 $locale, $locale_slug 220 223 ) ); 224 225 // Link Projects & Stats 221 226 foreach ( $stats as $row ) { 222 227 $items[ $project_ids[ $row->project_id ] ]->stats = $row; 228 } 229 230 // Final sanity check that we have data to display. 231 foreach ( $items as $slug => $details ) { 232 if ( 233 ! isset( $details->stats ) || // Didn't find any cached data for a project 234 ! $details->stats->all // Project has no strings, not useful for this interface 235 ) { 236 unset( $items[ $slug ] ); 237 } 223 238 } 224 239
Note: See TracChangeset
for help on using the changeset viewer.