| @@ -34,11 +34,14 @@ | ||
| 34 | 34 | $required = ''; |
| 35 | 35 | if(isset($field->is_required) && $field->is_required == 1) |
| 36 | 36 | $required = '*'; |
| 37 | 37 | |
| 38 | +if(isset($field->rules) && strpos($field->rules, 'required') !== FALSE) | |
| 39 | + $required = '*'; | |
| 40 | + | |
| 38 | 41 | ?> |
| 39 | 42 | |
| 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); ?>"> | |
| 43 | +<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 | 44 | <label for="<?php echo esc_attr($field_id); ?>"><?php echo esc_html($field_label).esc_html($required); ?></label> |
| 42 | 45 | <div class="wdk-field-container"> |
| 43 | 46 | <fieldset class="wdk-rating-field"> |
| 44 | 47 | <input type="radio" id="f_<?php echo esc_attr($field_id); ?>_star5" name="<?php echo esc_attr($field_id); ?>" value="5" <?php if((int)wmvc_show_data($field_id, $db_data)=='5') echo 'checked="checked"';?>/> |
| @@ -43,9 +46,9 @@ | ||
| 43 | 46 | <fieldset class="wdk-rating-field"> |
| 44 | 47 | <input type="radio" id="f_<?php echo esc_attr($field_id); ?>_star5" name="<?php echo esc_attr($field_id); ?>" value="5" <?php if((int)wmvc_show_data($field_id, $db_data)=='5') echo 'checked="checked"';?>/> |
| 45 | 48 | <label class="full" for="f_<?php echo esc_attr($field_id); ?>_star5" title="<?php echo esc_attr__('Awesome - 5 stars', 'wpdirectorykit');?>"></label> |
| 46 | 49 | <input type="radio" id="f_<?php echo esc_attr($field_id); ?>_star4" name="<?php echo esc_attr($field_id); ?>" value="4" <?php if((int)wmvc_show_data($field_id, $db_data)=='4') echo 'checked="checked"';?>/> |
| 47 | - <label class="full" for="f_<?php echo esc_attr($field_id); ?>_star4" title="<?php echo esc_attr__('Pretty good - 4 stars ', 'wpdirectorykit');?>"></label> | |
| 50 | + <label class="full" for="f_<?php echo esc_attr($field_id); ?>_star4" title="<?php echo esc_attr__('Pretty good - 4 stars', 'wpdirectorykit');?>"></label> | |
| 48 | 51 | <input type="radio" id="f_<?php echo esc_attr($field_id); ?>_star3" name="<?php echo esc_attr($field_id); ?>" value="3" <?php if((int)wmvc_show_data($field_id, $db_data)=='3') echo 'checked="checked"';?>/> |
| 49 | 52 | <label class="full" for="f_<?php echo esc_attr($field_id); ?>_star3" title="<?php echo esc_attr__('Meh - 3 stars', 'wpdirectorykit');?>"></label> |
| 50 | 53 | <input type="radio" id="f_<?php echo esc_attr($field_id); ?>_star2" name="<?php echo esc_attr($field_id); ?>" value="2" <?php if((int)wmvc_show_data($field_id, $db_data)=='2') echo 'checked="checked"';?>/> |
| 51 | 54 | <label class="full" for="f_<?php echo esc_attr($field_id); ?>_star2" title="<?php echo esc_attr__('Kinda bad - 2 stars', 'wpdirectorykit');?>"></label> |
| @@ -52,11 +55,15 @@ | ||
| 52 | 55 | <input type="radio" id="f_<?php echo esc_attr($field_id); ?>_star1" name="<?php echo esc_attr($field_id); ?>" value="1" <?php if((int)wmvc_show_data($field_id, $db_data)=='1') echo 'checked="checked"';?>/> |
| 53 | 56 | <label class="full" for="f_<?php echo esc_attr($field_id); ?>_star1" title="<?php echo esc_attr__('Very bad - 1 star', 'wpdirectorykit');?>"></label> |
| 54 | 57 | </fieldset> |
| 55 | 58 | <span class="suffix"><?php |
| 56 | - echo esc_html($field->prefix); | |
| 59 | + // Dynamic field values are registered in the translation catalog separately. | |
| 60 | + // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText | |
| 61 | + echo esc_html__($field->prefix, 'wpdirectorykit'); | |
| 57 | 62 | if(!empty($field->prefix) && !empty($field->suffix)) echo ' / '; |
| 58 | - echo esc_html($field->suffix); | |
| 63 | + // Dynamic field values are registered in the translation catalog separately. | |
| 64 | + // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText | |
| 65 | + echo esc_html__($field->suffix, 'wpdirectorykit'); | |
| 59 | 66 | ?></span> |
| 60 | 67 | <?php if(!empty($field->hint)):?> |
| 61 | 68 | <p class="wdk-hint"> |
| 62 | 69 | <?php echo esc_html($field->hint); ?> |