column-adsense.php
1 year ago
column-date.php
1 year ago
column-debug.php
1 year ago
column-description.php
1 year ago
column-displayonce.php
1 year ago
column-privacyignore.php
1 year ago
column-shortcode.php
1 year ago
column-size.php
1 year ago
column-timing.php
1 year ago
column-type.php
1 year ago
column-used.php
1 week ago
icon-status.php
1 year ago
column-used.php
46 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Render column. |
| 4 | * |
| 5 | * @package AdvancedAds |
| 6 | * @var int $ad_id Ad ID. |
| 7 | * @var array $groups Groups the ad is used in. |
| 8 | * @var array $placements Placements the ad is used in. |
| 9 | */ |
| 10 | |
| 11 | if ( $groups ) : |
| 12 | ?> |
| 13 | <strong><?php echo esc_html__( 'Groups', 'advanced-ads' ) . ':'; ?></strong> |
| 14 | <div> |
| 15 | <?php |
| 16 | $group_links = []; |
| 17 | foreach ( $groups as $group ) { |
| 18 | $group_links[] = '<a href="' . esc_attr( $group['edit_link'] ) . '" target="_blank">' |
| 19 | . esc_html( $group['title'] ) . '</a>'; |
| 20 | } |
| 21 | echo implode( ', ', $group_links ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $group_links is HTML. |
| 22 | ?> |
| 23 | </div> |
| 24 | <?php |
| 25 | endif; |
| 26 | |
| 27 | if ( $groups && $placements ) { |
| 28 | echo '<br>'; |
| 29 | } |
| 30 | |
| 31 | if ( $placements ) : |
| 32 | ?> |
| 33 | <strong><?php echo esc_html__( 'Placements', 'advanced-ads' ) . ':'; ?></strong> |
| 34 | <div> |
| 35 | <?php |
| 36 | $placement_links = []; |
| 37 | foreach ( $placements as $placement ) { |
| 38 | $placement_links[] = '<a href="' . esc_attr( $placement['edit_link'] ) . '" target="_blank">' |
| 39 | . esc_html( $placement['title'] ) . '</a>'; |
| 40 | } |
| 41 | echo implode( ', ', $placement_links ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $placement_links is HTML. |
| 42 | ?> |
| 43 | </div> |
| 44 | <?php |
| 45 | endif; |
| 46 |