| 494 | | $low = empty( $api->banners['low'] ) ? $api->banners['high'] : $api->banners['low']; |
| 495 | | $high = empty( $api->banners['high'] ) ? $api->banners['low'] : $api->banners['high']; |
| 496 | | ?> |
| 497 | | <style type="text/css"> |
| 498 | | #plugin-information-title.with-banner { |
| 499 | | background-image: url( <?php echo esc_url( $low ); ?> ); |
| 500 | | } |
| 501 | | @media only screen and ( -webkit-min-device-pixel-ratio: 1.5 ) { |
| 502 | | #plugin-information-title.with-banner { |
| 503 | | background-image: url( <?php echo esc_url( $high ); ?> ); |
| 504 | | } |
| 505 | | } |
| 506 | | </style> |
| 507 | | <?php |
| | 494 | $low = empty( $api->banners['low'] ) ? false : $api->banners['low']; |
| | 495 | $high = empty( $api->banners['high'] ) ? false : $api->banners['high']; |
| | 496 | $lowrtl = empty( $api->banners['low-rtl'] ) ? false : $api->banners['low-rtl']; |
| | 497 | $highrtl = empty( $api->banners['high-rtl'] ) ? false : $api->banners['high-rtl']; |
| | 498 | |
| | 499 | $style = '<style type="text/css">'; |
| | 500 | |
| | 501 | if ( $low ) { |
| | 502 | $style .= '#plugin-information-title.with-banner { background-image: url( ' . esc_url( $low ). ' ); }'; |
| | 503 | } |
| | 504 | if ( $high ) { |
| | 505 | $style .= '@media only screen and ( -webkit-min-device-pixel-ratio: 1.5 ) { #plugin-information-title.with-banner { background-image: url( ' . esc_url( $high ) . ' ); } }'; |
| | 506 | } |
| | 507 | if ( $lowrtl ) { |
| | 508 | $style .= '.rtl #plugin-information-title.with-banner { background-image: url( ' . esc_url( $lowrtl ). ' ); }'; |
| | 509 | } |
| | 510 | if ( $highrtl ) { |
| | 511 | $style .= '@media only screen and ( -webkit-min-device-pixel-ratio: 1.5 ) { .rtl #plugin-information-title.with-banner { background-image: url( ' . esc_url( $highrtl ) . ' ); } }'; |
| | 512 | } |
| | 513 | |
| | 514 | $style .= '</style>'; |
| | 515 | |
| | 516 | echo $style; |