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