PluginProbe ʕ •ᴥ•ʔ
Pods – Custom Content Types and Fields / 3.3.6
Pods – Custom Content Types and Fields v3.3.6
trunk 1.14.8 2.7.31.3 2.8.23.3 2.9.19.3 3.0.10.3 3.1.4.1 3.2.0 3.2.1 3.2.1.1 3.2.2 3.2.4 3.2.5 3.2.6 3.2.7 3.2.7.1 3.2.8 3.2.8.1 3.2.8.2 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9
pods / ui / front / view.php
pods / ui / front Last commit date
display 4 months ago pagination 4 months ago filters.php 4 months ago form.php 4 months ago view.php 4 months ago widgets.php 4 months ago
view.php
51 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 pods_form_enqueue_style( 'pods-form' );
11
12 /**
13 * @var array $fields
14 * @var Pods $pod
15 */
16 ?>
17 <div class="pods-submittable-fields">
18 <ul class="pods-form-fields">
19 <?php
20 foreach ( $fields as $field ) {
21 if ( isset( $field['custom_display'] ) && is_callable( $field['custom_display'] ) ) {
22 $value = call_user_func_array(
23 $field['custom_display'], array(
24 $pod->row(),
25 $pod,
26 $pod->field( $field['name'] ),
27 $field['name'],
28 $field,
29 )
30 );
31 } else {
32 $value = $pod->display( $field['name'] );
33 }
34 $default_class = ' pods-form-ui-row-type-' . $field['type'] . ' pods-form-ui-row-name-' . PodsForm::clean( $field[ 'name' ] );
35 $html_class = apply_filters( 'pods-field-html-class', $field ) . $default_class;
36 ?>
37 <li class="pods-field__container pods-field <?php echo esc_attr( $html_class, true ); ?>">
38 <div class="pods-field-label">
39 <strong><?php echo esc_html($field['label'] ); ?></strong>
40 </div>
41
42 <div class="pods-field-input">
43 <?php echo wp_kses_post( $value ); ?>
44 </div>
45 </li>
46 <?php
47 }//end foreach
48 ?>
49 </ul>
50 </div>
51