Changeset 3186
- Timestamp:
- 05/19/2016 10:09:57 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
r3020 r3186 235 235 * 236 236 * @param \WP_Post|string $plugin An instance of a Plugin post, or the plugin slug. 237 * @param string $output Output type. Default: 'raw'.237 * @param string $output Output type. 'html' or 'raw'. Default: 'raw'. 238 238 * @return mixed 239 239 */ … … 265 265 266 266 switch ( $output ) { 267 case 'html': 268 $id = "plugin-banner-{$plugin_slug}"; 269 $html = "<style type='text/css'>"; 270 $html .= "#{$id} { background-image: url('{$banner}'); }"; 271 if ( ! empty( $icon_2x ) ) { 272 $html .= "@media only screen and (-webkit-min-device-pixel-ratio: 1.5) { #{$id} { background-image: url('{$banner_2x}'); } }"; 273 } 274 $html .= "</style>"; 275 $html .= "<div class='plugin-banner' id='{$id}'></div>"; 276 277 return $html; 278 break; 267 279 case 'raw': 268 280 default:
Note: See TracChangeset
for help on using the changeset viewer.