type
2 years ago
div-row.php
2 years ago
div-rows.php
2 years ago
form.php
2 years ago
list-row.php
2 years ago
list-rows.php
2 years ago
p-row.php
2 years ago
p-rows.php
2 years ago
table-row.php
2 years ago
table-rows.php
2 years ago
table-row.php
50 lines
| 1 | <?php |
| 2 | // Don't load directly. |
| 3 | if ( ! defined( 'ABSPATH' ) ) { |
| 4 | die( '-1' ); |
| 5 | } |
| 6 | |
| 7 | /** |
| 8 | * @var Pods $pod |
| 9 | * @var mixed $id |
| 10 | * @var string $field_prefix |
| 11 | * @var string $th_scope |
| 12 | * @var \Pods\Whatsit\Field $field |
| 13 | * @var string $row_classes |
| 14 | * @var mixed $value |
| 15 | * @var string|null $heading_tag |
| 16 | */ |
| 17 | ?> |
| 18 | <tr valign="top" class="pods-field__container pods-field-option <?php echo esc_attr( $row_classes ); ?>" |
| 19 | style="<?php echo esc_attr( 'hidden' == $field['type'] ? 'display:none;' : '' ); ?>"> |
| 20 | <?php if ( 'heading' === $field['type'] ) : ?> |
| 21 | <?php $heading_tag = pods_v( $field['type'] . '_tag', $field, isset( $heading_tag ) ? $heading_tag : 'h2', true ); ?> |
| 22 | <td colspan="2"> |
| 23 | <<?php echo esc_html( sanitize_key( $heading_tag ) ); ?> |
| 24 | class="pods-form-ui-heading pods-form-ui-heading-<?php echo esc_attr( $field['name'] ); ?>" |
| 25 | id="heading-<?php echo esc_attr( $field['name'] ); ?>"> |
| 26 | <?php echo esc_html( $field['label'] ); ?> |
| 27 | </<?php echo esc_html( sanitize_key( $heading_tag ) ); ?>> |
| 28 | <?php echo PodsForm::comment( $field['name'], pods_v( 'description', $field ), $field ); ?> |
| 29 | </td> |
| 30 | <?php elseif ( 'html' === $field['type'] && 1 === (int) $field['html_no_label'] ) : ?> |
| 31 | <td colspan="2"> |
| 32 | <?php echo PodsForm::field( $field['name'], $value, $field['type'], $field, $pod, $id ); ?> |
| 33 | </td> |
| 34 | <?php else : ?> |
| 35 | <th<?php if ( ! empty( $th_scope ) ) : ?> |
| 36 | scope="<?php echo esc_attr( $th_scope ); ?>" |
| 37 | <?php endif; ?>> |
| 38 | <?php echo PodsForm::label( $field['name'], $field['label'], pods_v( 'help', $field ), $field ); ?> |
| 39 | </th> |
| 40 | <td> |
| 41 | <div class="pods-submittable-fields"> |
| 42 | <?php |
| 43 | echo PodsForm::field( $field['name'], $value, $field['type'], $field, $pod, $id ); |
| 44 | echo PodsForm::comment( $field['name'], pods_v( 'description', $field ), $field ); |
| 45 | ?> |
| 46 | </div> |
| 47 | </td> |
| 48 | <?php endif; ?> |
| 49 | </tr> |
| 50 |