| @@ -32,18 +32,21 @@ | ||
| 32 | 32 | $required = ''; |
| 33 | 33 | if(isset($field->is_required) && $field->is_required == 1) |
| 34 | 34 | $required = '*'; |
| 35 | 35 | |
| 36 | +if(isset($field->rules) && strpos($field->rules, 'required') !== FALSE) | |
| 37 | + $required = '*'; | |
| 38 | + | |
| 36 | 39 | $default = ''; |
| 37 | 40 | if(isset($field->default) && $field->default == 1) |
| 38 | 41 | $default = '1'; |
| 39 | 42 | |
| 40 | 43 | ?> |
| 41 | -<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); ?>"> | |
| 42 | 45 | <label for="<?php echo esc_attr($field_id); ?>"><?php echo esc_html($field_label).esc_html($required); ?></label> |
| 43 | 46 | <div class="wdk-field-container"> |
| 44 | 47 | <fieldset> |
| 45 | - <legend class="screen-reader-text"><span><?php echo __('Visible on','wpdirectorykit'); ?></span></legend> | |
| 48 | + <legend class="screen-reader-text"><span><?php echo esc_html__('Visible on','wpdirectorykit'); ?></span></legend> | |
| 46 | 49 | <label for="<?php echo esc_attr($field_id); ?>"> |
| 47 | 50 | <input name="<?php echo esc_attr($field_id); ?>" type="checkbox" id="<?php echo esc_attr($field_id); ?>" value="1" <?php echo !empty(wmvc_show_data($field_id, $db_data, $default))?'checked':''; ?>> |
| 48 | 51 | </label> |
| 49 | 52 | </fieldset> |
| @@ -48,9 +51,9 @@ | ||
| 48 | 51 | </label> |
| 49 | 52 | </fieldset> |
| 50 | 53 | <?php if(!empty($field->hint)):?> |
| 51 | 54 | <p class="wdk-hint"> |
| 52 | - <?php echo esc_html($field->hint); ?> | |
| 55 | + <?php echo wp_kses_post($field->hint); ?> | |
| 53 | 56 | </p> |
| 54 | 57 | <?php endif;?> |
| 55 | 58 | </div> |
| 56 | 59 | </div> |