Changeset 3670 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
- Timestamp:
- 07/12/2016 04:48:41 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
r3545 r3670 233 233 } 234 234 235 // Fallback to SVG if it exists. 235 236 if ( ! $icon && $svg ) { 236 237 $icon = $svg; 238 } 239 240 // Fallback to 2x if it exists. 241 if ( ! $icon && $icon_2x ) { 242 $icon = $icon_2x; 237 243 } 238 244 … … 257 263 $id = "plugin-icon-{$plugin_slug}"; 258 264 $html = "<style type='text/css'>"; 259 $html .= "#{$id} { background-image: url('{$icon}'); } .plugin-icon { background-size: 128px 128px; height: 128px; width: 128px; }";265 $html .= "#{$id} { background-image: url('{$icon}'); } .plugin-icon { background-size: cover; height: 128px; width: 128px; }"; 260 266 if ( ! empty( $icon_2x ) && ! $generated ) { 261 267 $html .= "@media only screen and (-webkit-min-device-pixel-ratio: 1.5) { #{$id} { background-image: url('{$icon_2x}'); } }";
Note: See TracChangeset
for help on using the changeset viewer.