PluginProbe
WP Directory Kit / 1.5.4
WP Directory Kit v1.5.4
1.5.9 1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 trunk 1.1.0 1.1.6 1.1.8 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.8 All 37 releases
wpdirectorykit / application / views / fields_edit / JSON_READONLY.php

JSON_READONLY.php in WP Directory Kit 1.5.4, at application/views/fields_edit/JSON_READONLY.php

74 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The template for Edit field TEXTAREA.
4 *
5 * This is the template that field layout for edit form
6 *
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit; // Exit if accessed directly.
11 }
12 ?>
13 <?php
14
15 //wmvc_dump($field);
16
17 if(isset($field->field))
18 {
19 $field_id = $field->field;
20 }
21 else
22 {
23 $field_id = 'field_'.$field->idfield;
24 }
25
26 if(!isset($field->hint))$field->hint = '';
27 if(!isset($field->columns_number))$field->columns_number = '';
28 if(!isset($field->class))$field->class = '';
29
30 $field_label = $field->field_label;
31
32 $required = '';
33 if(isset($field->is_required) && $field->is_required == 1)
34 $required = '*';
35
36 if(isset($field->rules) && strpos($field->rules, 'required') !== FALSE)
37 $required = '*';
38
39 ?>
40
41 <div class="wdk-field-<?php echo esc_attr($field_id);?> wdk-field-edit <?php echo esc_attr($field->field_type); ?> wdk-col-<?php echo esc_attr($field->columns_number); ?> <?php echo esc_attr($field->class); ?>">
42 <label for="<?php echo esc_attr($field_id); ?>"><?php echo esc_html($field_label).esc_html($required); ?></label>
43 <div class="wdk-field-container">
44 <span class="regular-span" style="">
45 <?php
46 $json_data = wmvc_show_data(esc_attr($field_id), $db_data, '', FALSE);
47 if(!empty($json_data)) :
48 $json_data = json_decode($json_data);
49 ?>
50 <?php foreach ($json_data as $key => $value) : ?>
51 <?php if(in_array(strtolower($key), array('element_id','eli_id','eli_type','eli_page_id','action','message'))) continue;?>
52 <?php if (!empty($value)) : ?>
53 <?php if(in_array($key, array('eli_id', 'eli_type', 'eli_nonce','eli_token','_wp_http_referer', 'ID','filter','action','send_action_type', 'g-recaptcha-response'))) continue; ?>
54 <p>
55 <?php if(!is_intval($key)):?>
56 <strong><?php echo esc_html__(ucfirst(str_replace('_', ' ', $key)),'wpdirectorykit'); ?>:</strong>
57 <?php endif;?>
58 <?php if(filter_var($value, FILTER_VALIDATE_URL ) || strpos( $value, 'http' ) !== FALSE):?>
59 <a href="<?php echo esc_url($value);?>"><?php echo wp_kses_post($value); ?></a><br />
60 <?php else : ?>
61 <?php echo wp_kses_post($value); ?><br />
62 <?php endif; ?>
63 </p>
64 <?php endif; ?>
65 <?php endforeach; ?>
66 <?php endif;?>
67 </span>
68 <?php if(!empty($field->hint)):?>
69 <p class="wdk-hint">
70 <?php echo esc_html($field->hint); ?>
71 </p>
72 <?php endif;?>
73 </div>
74 </div>