Making WordPress.org


Ignore:
Timestamp:
07/17/2015 09:34:35 PM (9 years ago)
Author:
ocean90
Message:

Translate: Provide a fallback for bbpress, buddypress and wp-plugins icons. Double the size of theme screenshots for HiDPI screens.

see #1091.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/translate.wordpress.org/includes/gp-plugins/wporg-routes/routes/locale.php

    r1747 r1749  
    162162                $screenshot = gp_get_meta( 'wp-themes', $sub_project->id, 'screenshot' );
    163163                if ( $screenshot ) {
    164                     return '<div class="theme icon"><img src="https://i0.wp.com/' . $screenshot . '?w=' . $size . '&amp;strip=all"></div>';
     164                    return '<div class="theme icon"><img src="https://i0.wp.com/' . $screenshot . '?w=' . ( $size * 2 ) . '&amp;strip=all" width="' . $size . '" height="' . $size . '"></div>';
    165165                } else {
    166166                    return '<div class="default-icon"><span class="dashicons dashicons-admin-appearance"></span></div>';
     
    171171                if ( function_exists( 'wporg_get_plugin_icon' ) ) {
    172172                    return wporg_get_plugin_icon( $project->slug, $size );
     173                } else {
     174                    return '<div class="default-icon"><span class="dashicons dashicons-admin-plugins"></span></div>';
    173175                }
    174176            case 'wp-plugins':
     
    176178                if ( function_exists( 'wporg_get_plugin_icon' ) ) {
    177179                    return wporg_get_plugin_icon( $sub_project->slug, $size );
     180                } else {
     181                    return '<div class="default-icon"><span class="dashicons dashicons-admin-plugins"></span></div>';
    178182                }
    179183            case 'glotpress':
Note: See TracChangeset for help on using the changeset viewer.