Changeset 6851 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/routes/class-locale.php
- Timestamp:
- 03/10/2018 12:11:16 PM (8 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
r6770 r6851 3 3 namespace WordPressdotorg\GlotPress\Routes\Routes; 4 4 5 // wporg_get_plugin_icon()6 5 use GP; 7 6 use GP_Locales; … … 311 310 return '<div class="default-icon"><span class="dashicons dashicons-admin-appearance"></span></div>'; 312 311 } 313 case 'bbpress': 314 case 'buddypress': 315 if ( function_exists( 'wporg_get_plugin_icon' ) ) { 316 $screenshot = wporg_get_plugin_icon( $project->slug, $size ); 317 if ( $screenshot ) { 318 return $screenshot; 312 case 'wp-plugins': 313 $icon = ''; 314 315 if ( class_exists( 'WordPressdotorg\Plugin_Directory\Template' ) ) { 316 $directory_post_id = gp_get_meta( 'wp-plugins', $sub_project->id, 'directory-post-id' ); 317 if ( $directory_post_id ) { 318 switch_to_blog( WPORG_PLUGIN_DIRECTORY_BLOGID ); 319 $icon = \WordPressdotorg\Plugin_Directory\Template::get_plugin_icon( $directory_post_id, 'html' ); 320 restore_current_blog(); 319 321 } 320 322 } 323 324 if ( $icon ) { 325 return $icon; 326 } 327 321 328 return '<div class="default-icon"><span class="dashicons dashicons-admin-plugins"></span></div>'; 322 case 'wp-plugins':323 if ( function_exists( 'wporg_get_plugin_icon' ) ) {324 $screenshot = wporg_get_plugin_icon( $sub_project->slug, $size );325 if ( $screenshot ) {326 return $screenshot;327 }328 }329 return '<div class="default-icon"><span class="dashicons dashicons-admin-plugins"></span></div>';330 case 'glotpress':331 return '<div class="icon"><img src="'. plugins_url( 'templates/images/glotpress.png', 'wporg-gp-customizations/wporg-gp-customizations.php' ) . '" width="' . $size . '" height="' . $size . '"></div>';332 329 case 'apps': 333 330 return '<div class="default-icon"><span class="dashicons dashicons-smartphone"></span></div>';
Note: See TracChangeset
for help on using the changeset viewer.