| @@ -32,16 +32,35 @@ | ||
| 32 | 32 | $required = ''; |
| 33 | 33 | if(isset($field->is_required) && $field->is_required == 1) |
| 34 | 34 | $required = '*'; |
| 35 | 35 | |
| 36 | + | |
| 37 | +if(isset($field->rules) && strpos($field->rules, 'required') !== FALSE) | |
| 38 | + $required = '*'; | |
| 39 | + | |
| 36 | 40 | wdk_search_fields_toggle(); |
| 37 | 41 | |
| 38 | 42 | ?> |
| 39 | 43 | |
| 40 | -<div class="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); ?>"> | |
| 44 | +<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); ?>"> | |
| 41 | 45 | <label for="<?php echo esc_attr($field_id); ?>"><?php echo esc_html($field_label).esc_html($required); ?></label> |
| 42 | 46 | <div class="wdk-field-container"> |
| 43 | - <?php echo wdk_treefield_option($field_id, 'listing_m', wmvc_show_data($field_id, $db_data, ''), 'post_title', '', __('Not Selected', 'wpdirectorykit'),'',TRUE);?> | |
| 47 | + <?php | |
| 48 | + echo wp_kses( | |
| 49 | + wdk_treefield_option($field_id, 'listing_m', wmvc_show_data($field_id, $db_data, ''), 'post_title', '', __('Not Selected', 'wpdirectorykit'), '', TRUE), | |
| 50 | + array( | |
| 51 | + 'input' => array( | |
| 52 | + 'name' => true, | |
| 53 | + 'value' => true, | |
| 54 | + 'class' => true, | |
| 55 | + 'type' => true, | |
| 56 | + 'id' => true, | |
| 57 | + 'readonly' => true, | |
| 58 | + ), | |
| 59 | + ) | |
| 60 | + ); | |
| 61 | + ?> | |
| 62 | + | |
| 44 | 63 | <?php if(!empty($field->hint)):?> |
| 45 | 64 | <p class="wdk-hint"> |
| 46 | 65 | <?php echo esc_html($field->hint); ?> |
| 47 | 66 | </p> |