html-location-group.php 594 B

123456789101112131415161718192021222324252627282930
  1. <div class="rule-group" data-id="<?php echo $group_id; ?>">
  2. <h4><?php echo ( $group_id == 'group_0' ) ? __( 'Show this field group if', 'acf' ) : __( 'or', 'acf' ); ?></h4>
  3. <table class="acf-table -clear">
  4. <tbody>
  5. <?php
  6. foreach ( $group as $i => $rule ) :
  7. // validate rule
  8. $rule = acf_validate_location_rule( $rule );
  9. // append id and group
  10. $rule['id'] = "rule_{$i}";
  11. $rule['group'] = $group_id;
  12. // view
  13. acf_get_view(
  14. 'html-location-rule',
  15. array(
  16. 'rule' => $rule,
  17. )
  18. );
  19. endforeach;
  20. ?>
  21. </tbody>
  22. </table>
  23. </div>