condition-author.php
1 year ago
condition-device.php
1 year ago
condition-is-or-not.php
1 year ago
condition-number.php
3 years ago
condition-operator.php
1 year ago
condition-string.php
2 years ago
conditions-form.php
5 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
1 year ago
condition-number.php
27 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Template to select number-based conditions. |
| 4 | * |
| 5 | * @var string $name form name attribute. |
| 6 | * @var string $operator operator. |
| 7 | * @var array $type_options array with information. We get the description of the condition from here. |
| 8 | */ |
| 9 | ?> |
| 10 | <input type="hidden" name="<?php echo esc_attr( $name ); ?>[type]" value="<?php echo esc_attr( $options['type'] ); ?>"/> |
| 11 | <select name="<?php echo esc_attr( $name ); ?>[operator]"> |
| 12 | <option |
| 13 | value="is_equal" <?php selected( 'is_equal', $operator ); ?>><?php esc_html_e( 'equal', 'advanced-ads' ); ?></option> |
| 14 | <option |
| 15 | value="is_higher" <?php selected( 'is_higher', $operator ); ?>><?php esc_html_e( 'equal or higher', 'advanced-ads' ); ?></option> |
| 16 | <option |
| 17 | value="is_lower" <?php selected( 'is_lower', $operator ); ?>><?php esc_html_e( 'equal or lower', 'advanced-ads' ); ?></option> |
| 18 | </select><input type="number" name="<?php echo esc_attr( $name ); ?>[value]" value="<?php echo absint( $value ); ?>"/> |
| 19 | <p class="description"> |
| 20 | <?php echo esc_html( $type_options[ $options['type'] ]['description'] ); ?> |
| 21 | <?php if ( isset( $type_options[ $options['type'] ]['helplink'] ) ) : ?> |
| 22 | <a href="<?php echo esc_url( $type_options[ $options['type'] ]['helplink'] ); ?>" class="advads-manual-link" target="_blank"> |
| 23 | <?php esc_html_e( 'Manual', 'advanced-ads' ); ?> |
| 24 | </a> |
| 25 | <?php endif; ?> |
| 26 | </p> |
| 27 |