ad-label-position.php
1 year ago
ad-label.php
1 year ago
content-index.php
2 months ago
inline-css.php
1 year ago
item.php
1 year ago
name.php
1 year ago
status.php
1 year ago
item.php
35 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Markup for the placement item select box. |
| 4 | * |
| 5 | * @package AdvancedAds |
| 6 | * @author Advanced Ads <info@wpadvancedads.com> |
| 7 | * @since 1.50.0 |
| 8 | * |
| 9 | * @var Placement $placement Placement instance. |
| 10 | */ |
| 11 | |
| 12 | ?> |
| 13 | <div class="advads-placement-item-select-wrap"> |
| 14 | <select |
| 15 | id="advads-placements-modal-item-<?php echo esc_attr( $placement->get_id() ); ?>" |
| 16 | name="advads[placements][item]" |
| 17 | class="advads-placement-item-select" |
| 18 | > |
| 19 | <option value=""><?php esc_html_e( '--not selected--', 'advanced-ads' ); ?></option> |
| 20 | |
| 21 | <?php foreach ( $placement->get_type_object()->get_allowed_items() as $item_group ) : ?> |
| 22 | <optgroup label="<?php echo esc_attr( $item_group['label'] ); ?>"> |
| 23 | <?php foreach ( $item_group['items'] as $item_id => $item_name ) : ?> |
| 24 | <option value="<?php echo esc_attr( $item_id ); ?>"<?php selected( $placement->get_item(), $item_id ); ?>> |
| 25 | <?php echo esc_html( $item_name ); ?> |
| 26 | </option> |
| 27 | <?php endforeach; ?> |
| 28 | </optgroup> |
| 29 | <?php endforeach; ?> |
| 30 | </select> |
| 31 | <a class="advads-placement-item-edit" href="<?php echo esc_url( $placement->get_item_object() ? $placement->get_item_object()->get_edit_link() : '#' ); ?>" title="<?php esc_attr_e( 'Edit item', 'advanced-ads' ); ?>"> |
| 32 | <span class="dashicons dashicons-external"></span> |
| 33 | </a> |
| 34 | </div> |
| 35 |