condition-author.php
1 year ago
condition-device.php
3 weeks ago
condition-is-or-not.php
3 weeks ago
condition-number.php
3 weeks ago
condition-operator.php
1 year ago
condition-string.php
2 years ago
conditions-form.php
6 months ago
display-conditions-list.php
1 year ago
no-option.php
1 year ago
not-selected.php
4 years ago
visitor-conditions-list.php
3 weeks ago
condition-is-or-not.php
33 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Template for a condition that only contains of an is/is_not choice. |
| 4 | * |
| 5 | * @package AdvancedAds |
| 6 | * |
| 7 | * @var string $name Form field name attribute. |
| 8 | * @var string $operator Operator. |
| 9 | * @var array<string, array<string, mixed>> $type_options Additional options for the condition. |
| 10 | */ |
| 11 | |
| 12 | ?> |
| 13 | <input type="hidden" name="<?php echo esc_attr( $name ); ?>[type]" value="<?php echo esc_attr( $options['type'] ); ?>"/> |
| 14 | |
| 15 | <?php // Note: placeholder tag so it's not considered empty condition. ?> |
| 16 | <input type="hidden" name="<?php echo esc_attr( $name ); ?>[value]" value="1"> |
| 17 | |
| 18 | <?php |
| 19 | require ADVADS_ABSPATH . 'admin/views/conditions/condition-operator.php'; |
| 20 | ?> |
| 21 | <p class="description"> |
| 22 | <?php echo esc_html( $type_options[ $options['type'] ]['description'] ); ?> |
| 23 | <?php |
| 24 | if ( isset( $type_options[ $options['type'] ]['helplink'] ) ) { |
| 25 | printf( |
| 26 | '<a href="%1$s" class="advads-manual-link" target="_blank">%2$s</a>', |
| 27 | esc_url( $type_options[ $options['type'] ]['helplink'] ), |
| 28 | esc_html__( 'Manual', 'advanced-ads' ) |
| 29 | ); |
| 30 | } |
| 31 | ?> |
| 32 | </p> |
| 33 |