conditional-logic.php
1 year ago
field.php
2 months ago
fields.php
2 months ago
index.php
1 year ago
list-empty.php
8 months ago
location-group.php
1 year ago
location-rule.php
8 months ago
locations.php
8 months ago
options.php
8 months ago
location-group.php
30 lines
| 1 | <div class="rule-group" data-id="<?php echo esc_attr( $group_id ); ?>"> |
| 2 | |
| 3 | <h4><?php echo ( $group_id == 'group_0' ) ? esc_html__( 'Show this field group if', 'secure-custom-fields' ) : esc_html__( 'or', 'secure-custom-fields' ); ?></h4> |
| 4 | |
| 5 | <table class="acf-table -clear"> |
| 6 | <tbody> |
| 7 | <?php |
| 8 | foreach ( $group as $i => $rule ) : |
| 9 | |
| 10 | // validate rule |
| 11 | $rule = acf_validate_location_rule( $rule ); |
| 12 | |
| 13 | // append id and group |
| 14 | $rule['id'] = "rule_{$i}"; |
| 15 | $rule['group'] = $group_id; |
| 16 | |
| 17 | // view |
| 18 | acf_get_view( |
| 19 | 'acf-field-group/location-rule', |
| 20 | array( |
| 21 | 'rule' => $rule, |
| 22 | ) |
| 23 | ); |
| 24 | endforeach; |
| 25 | ?> |
| 26 | </tbody> |
| 27 | </table> |
| 28 | |
| 29 | </div> |
| 30 |