PluginProbe
WP Directory Kit / 1.5.9
WP Directory Kit v1.5.9
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
← All changes | application/views/fields_edit/DROPDOWN.php +27 -3 1.5.5 → 1.5.9 View file →
@@ -61,19 +61,43 @@
61 61
62 62 <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;?>">
63 63 <label for="<?php echo esc_attr($field_id); ?>"><?php echo esc_html($field_label).esc_html($required); ?></label>
64 64 <div class="wdk-field-container">
65 - <?php echo wmvc_select_option($field_id, $values, !empty(wmvc_show_data($field_id, $db_data, $field->default)) ? wmvc_show_data($field_id, $db_data, $field->default) : $field->empty_default, "id='".$field_id."'"); ?>
65 + <?php
66 + echo wp_kses(
67 + wmvc_select_option(
68 + $field_id,
69 + $values,
70 + !empty(wmvc_show_data($field_id, $db_data, $field->default)) ? wmvc_show_data($field_id, $db_data, $field->default) : $field->empty_default,
71 + "id='" . esc_attr($field_id) . "'"
72 + ),
73 + [
74 + 'select' => [
75 + 'id' => true,
76 + 'name' => true,
77 + ],
78 + 'option' => [
79 + 'value' => true,
80 + 'selected' => true,
81 + ],
82 + ]
83 + );
84 + ?>
85 +
66 86 <span class="suffix"><?php
87 + // Dynamic field values are registered in the translation catalog separately.
88 + // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText
67 89 echo esc_html__($field->prefix, 'wpdirectorykit');
68 90 if(!empty($field->prefix) && !empty($field->suffix)) echo ' / ';
91 + // Dynamic field values are registered in the translation catalog separately.
92 + // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText
69 93 echo esc_html__($field->suffix, 'wpdirectorykit');
70 94 ?><?php if(($field_id=='wdk_listing_page' || $field_id=='wdk_results_page')):?>
71 95 <?php if(!empty(wmvc_show_data($field_id, $db_data, '')) && get_post_status(wmvc_show_data($field_id, $db_data, '')) == 'publish'):?>
72 - <a class="button button-primary" target="_blank" href="<?php echo get_permalink(wmvc_show_data($field_id, $db_data, ''));?>" style="margin-top: -5px;">
96 + <a class="button button-primary" target="_blank" href="<?php echo esc_url(get_permalink(wmvc_show_data($field_id, $db_data, '')));?>" style="margin-top: -5px;">
73 97 <?php echo esc_html__('View Page','wpdirectorykit');?>
74 98 </a>
75 - <a class="button button" target="_blank" href="<?php echo admin_url('post.php?post='.wmvc_show_data($field_id, $db_data, '').'&action=edit');?>" style="margin-top: -5px;">
99 + <a class="button button" target="_blank" href="<?php echo esc_url(admin_url('post.php?post='.wmvc_show_data($field_id, $db_data, '')).'&action=edit');?>" style="margin-top: -5px;">
76 100 <span class="dashicons dashicons-edit" style="line-height: 29px;"></span>
77 101 </a>
78 102 <?php else:?>
79 103 <a class="button button-primary" target="_blank" href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk_settings&function=import_demo"); ?>" style="margin-top: -5px;">