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
conditions-form.php
50 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Render the conditions form |
| 4 | * |
| 5 | * @package AdvancedAds |
| 6 | * @author Advanced Ads <info@wpadvancedads.com> |
| 7 | */ |
| 8 | |
| 9 | ?> |
| 10 | |
| 11 | <fieldset data-condition-list-target="<?php echo esc_attr( $list_target ); ?>" |
| 12 | data-condition-form-name="<?php echo esc_attr( $form_name ); ?>" |
| 13 | data-condition-action="<?php echo esc_attr( $action ); ?>" |
| 14 | data-condition-connector-default="<?php echo esc_attr( $connector_default ); ?>" |
| 15 | <?php |
| 16 | if ( $empty_options ) : |
| 17 | ?> class="advads-hide-in-wizard"<?php |
| 18 | endif; |
| 19 | ?>> |
| 20 | <legend><?php esc_attr_e( 'New condition', 'advanced-ads' ); ?></legend> |
| 21 | <input type="hidden" class="advads-conditions-index" |
| 22 | value="<?php echo is_array( $set_conditions ) ? count( $set_conditions ) : 0; ?>"/> |
| 23 | <div class="advads-conditions-new"> |
| 24 | <select> |
| 25 | <option value=""><?php esc_attr_e( '-- choose a condition --', 'advanced-ads' ); ?></option> |
| 26 | <?php foreach ( $conditions as $_condition_id => $_condition ) : ?> |
| 27 | <?php if ( empty( $_condition['disabled'] ) ) : ?> |
| 28 | <option value="<?php echo esc_attr( $_condition_id ); ?>"><?php echo esc_html( $_condition['label'] ); ?></option> |
| 29 | <?php endif; ?> |
| 30 | <?php |
| 31 | endforeach; |
| 32 | if ( isset( $pro_conditions ) && count( $pro_conditions ) ) : |
| 33 | ?> |
| 34 | <optgroup label="<?php esc_attr_e( 'Add-On features', 'advanced-ads' ); ?>"> |
| 35 | <?php |
| 36 | foreach ( $pro_conditions as $_pro_condition ) : |
| 37 | ?> |
| 38 | <option disabled="disabled"><?php echo esc_html( $_pro_condition ); ?></option> |
| 39 | <?php |
| 40 | endforeach; |
| 41 | ?> |
| 42 | </optgroup> |
| 43 | <?php |
| 44 | endif; |
| 45 | ?> |
| 46 | </select> |
| 47 | <span class="advads-loader" style="display: none;"></span> |
| 48 | </div> |
| 49 | </fieldset> |
| 50 |