display
2 years ago
pagination
1 year ago
filters.php
1 year ago
form.php
2 years ago
view.php
2 years ago
widgets.php
2 years ago
view.php
48 lines
| 1 | <?php |
| 2 | // Don't load directly. |
| 3 | if ( ! defined( 'ABSPATH' ) ) { |
| 4 | die( '-1' ); |
| 5 | } |
| 6 | |
| 7 | pods_form_enqueue_style( 'pods-form' ); |
| 8 | |
| 9 | /** |
| 10 | * @var array $fields |
| 11 | * @var Pods $pod |
| 12 | */ |
| 13 | ?> |
| 14 | <div class="pods-submittable-fields"> |
| 15 | <ul class="pods-form-fields"> |
| 16 | <?php |
| 17 | foreach ( $fields as $field ) { |
| 18 | if ( isset( $field['custom_display'] ) && is_callable( $field['custom_display'] ) ) { |
| 19 | $value = call_user_func_array( |
| 20 | $field['custom_display'], array( |
| 21 | $pod->row(), |
| 22 | $pod, |
| 23 | $pod->field( $field['name'] ), |
| 24 | $field['name'], |
| 25 | $field, |
| 26 | ) |
| 27 | ); |
| 28 | } else { |
| 29 | $value = $pod->display( $field['name'] ); |
| 30 | } |
| 31 | $default_class = ' pods-form-ui-row-type-' . $field['type'] . ' pods-form-ui-row-name-' . PodsForm::clean( $field[ 'name' ] ); |
| 32 | $html_class = apply_filters( 'pods-field-html-class', $field ) . $default_class; |
| 33 | ?> |
| 34 | <li class="pods-field__container pods-field <?php echo esc_attr( $html_class, true ); ?>"> |
| 35 | <div class="pods-field-label"> |
| 36 | <strong><?php echo $field['label']; ?></strong> |
| 37 | </div> |
| 38 | |
| 39 | <div class="pods-field-input"> |
| 40 | <?php echo $value; ?> |
| 41 | </div> |
| 42 | </li> |
| 43 | <?php |
| 44 | }//end foreach |
| 45 | ?> |
| 46 | </ul> |
| 47 | </div> |
| 48 |