preview-image.php
27 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Render preview information for the image ad type |
| 4 | * |
| 5 | * @package AdvancedAds |
| 6 | * @author Advanced Ads <info@wpadvancedads.com> |
| 7 | * |
| 8 | * @var string $src Image source URL. |
| 9 | * @var string $alt Alt attribute value. |
| 10 | * @var string $preview_hwstring Width and height information for the smaller preview icon. |
| 11 | * @var string $tooltip_hwstring Width and height information for the larger version in the tooltip. |
| 12 | */ |
| 13 | |
| 14 | ?> |
| 15 | <span class="advads-ad-list-tooltip"> |
| 16 | <span class="advads-ad-list-tooltip-content"> |
| 17 | <?php |
| 18 | // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $hwstring is not something we can escape. |
| 19 | printf( '<img src="%s" alt="%s" %s/>', esc_url( $src ), esc_attr( $alt ), $tooltip_hwstring ); |
| 20 | ?> |
| 21 | </span> |
| 22 | <?php |
| 23 | // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $hwstring is not something we can escape. |
| 24 | printf( '<img src="%s" alt="%s" %s/>', esc_url( $src ), esc_attr( $alt ), $preview_hwstring ); |
| 25 | ?> |
| 26 | </span> |
| 27 |