| @@ -68,12 +68,40 @@ | ||
| 68 | 68 | |
| 69 | 69 | <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); ?> <?php echo esc_attr($field->class); ?> <?php if(!empty($form) && method_exists($form, 'hasError') && $form->hasError($field_id)):?> field-error <?php endif;?>"> |
| 70 | 70 | <label for="<?php echo esc_attr($field_id); ?>"><?php echo esc_html($field_label).esc_html($required); ?></label> |
| 71 | 71 | <div class="wdk-field-container"> |
| 72 | - <?php echo wdk_select_option_multiple($field_id.'_select2', $values, $post_values, "id='".$field_id."_select2' class='select_multi' data-maxselectlimit='20' data-placeholder='".esc_attr($empty_value)."'"); ?> | |
| 72 | + <?php | |
| 73 | + echo wp_kses( | |
| 74 | + wdk_select_option_multiple( | |
| 75 | + $field_id.'_select2', | |
| 76 | + $values, | |
| 77 | + $post_values, | |
| 78 | + "id='".$field_id."_select2' class='select_multi' data-maxselectlimit='20' data-placeholder='".esc_attr($empty_value)."'" | |
| 79 | + ), | |
| 80 | + [ | |
| 81 | + 'select' => [ | |
| 82 | + 'id' => true, | |
| 83 | + 'class' => true, | |
| 84 | + 'data-maxselectlimit' => true, | |
| 85 | + 'data-placeholder' => true, | |
| 86 | + 'multiple' => true, | |
| 87 | + 'name' => true, | |
| 88 | + ], | |
| 89 | + 'option' => [ | |
| 90 | + 'value' => true, | |
| 91 | + 'selected' => true, | |
| 92 | + ], | |
| 93 | + ] | |
| 94 | + ); | |
| 95 | + ?> | |
| 96 | + | |
| 73 | 97 | <span class="suffix"><?php |
| 98 | + // Dynamic field values are registered in the translation catalog separately. | |
| 99 | + // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText | |
| 74 | 100 | echo esc_html__($field->prefix, 'wpdirectorykit'); |
| 75 | 101 | if(!empty($field->prefix) && !empty($field->suffix)) echo ' / '; |
| 102 | + // Dynamic field values are registered in the translation catalog separately. | |
| 103 | + // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText | |
| 76 | 104 | echo esc_html__($field->suffix, 'wpdirectorykit'); |
| 77 | 105 | ?></span> |
| 78 | 106 | <?php if(!empty($field->hint)):?> |
| 79 | 107 | <p class="wdk-hint"> |