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 | elementor-elements/views/wdk-listing-map.php +25 -5 1.3.2 → 1.5.9 View file →
@@ -30,12 +30,16 @@
30 30 <form class="route_suggestion" action="">
31 31 <input class="input_text" type="hidden" name="address" value="<?php echo esc_attr(wdk_field_value('address', $wdk_listing_id));?>" />
32 32 <input class="input_text" type="hidden" name="gps" value="<?php echo esc_attr($lat.','.$lng);?>" />
33 33 <div class="wdk-field-group">
34 - <input class="input_text" type="text" placeholder="<?php echo esc_html__(wmvc_show_data('text_suggestion_route_placeholder', $settings), 'wpdirectorykit');?>" name="route_from" />
34 + <input class="input_text" type="text" placeholder="<?php // Dynamic field values are registered in the translation catalog separately.
35 +// phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText
36 +echo esc_attr(wmvc_show_data('text_suggestion_route_placeholder', $settings), );?>" name="route_from" />
35 37 </div>
36 38 <div class="wdk-field-group">
37 - <button type="submit" class="wdk-btn"><?php echo esc_html__(wmvc_show_data('text_suggestion_route', $settings), 'wpdirectorykit');?></button>
39 + <button type="submit" class="wdk-btn"><?php // Dynamic field values are registered in the translation catalog separately.
40 +// phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText
41 +echo esc_html__(wmvc_show_data('text_suggestion_route', $settings), 'wpdirectorykit');?></button>
38 42 </div>
39 43 </form>
40 44 <?php endif;?>
41 45 </div>
@@ -181,8 +185,24 @@
181 185 }
182 186 ).addTo(wdk_map_<?php echo esc_html($id_element);?>);
183 187
184 188 <?php elseif(in_array($settings['conf_custom_map_style'], array(
189 + 'https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}{r}.png',
190 + 'https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png',
191 + 'https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png',
192 + 'https://cartodb-basemaps-{s}.global.ssl.fastly.net/dark_all/{z}/{x}/{y}{r}.png',
193 + ))):?>
194 +
195 + <?php
196 + // If no Carto key is provided, show default tile styling (fallback to OSM)
197 + if (!$is_edit_mode && empty($settings['carto_map_key'])): ?>
198 + var positron = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
199 + attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
200 + }).addTo(wdk_map);
201 + <?php else: ?>
202 + var positron = L.tileLayer('<?php echo esc_js($settings['conf_custom_map_style']);?>?key=<?php echo esc_js($settings['carto_map_key']);?>').addTo(wdk_map);
203 + <?php endif; ?>
204 + <?php elseif(in_array($settings['conf_custom_map_style'], array(
185 205 'https://{s}.tile.thunderforest.com/mobile-atlas/{z}/{x}/{y}.png',
186 206 'https://{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png',
187 207 'https://{s}.tile.thunderforest.com/transport-dark/{z}/{x}/{y}.png',
188 208 'https://{s}.tile.thunderforest.com/landscape/{z}/{x}/{y}.png',
@@ -244,15 +264,15 @@
244 264 let marker;
245 265 <?php if($pin_icon):?>
246 266 var image = '<?php echo esc_html($pin_icon);?>'; var innerMarker = '<div class="wdk_marker-container wdk_marker-container-image category_id_<?php echo esc_js(wdk_field_value('category_id', $wdk_listing_id));?>""><img src='+image+'></img></div>';
247 267 <?php elseif($font_icon && empty($font_class)):?>
248 - var innerMarker = '<div class="wdk_marker-container category_id_<?php echo esc_js(wdk_field_value('category_id', $wdk_listing_id));?>""><div class="front wdk_face"><?php echo wdk_viewe($font_icon);?></div><div class="wdk_marker-card"><div class="wdk_marker-arrow"></div></div></div>';
268 + var innerMarker = '<div class="wdk_marker-container category_id_<?php echo esc_js(wdk_field_value('category_id', $wdk_listing_id));?>""><div class="front wdk_face"><?php echo wdk_viewe($font_icon) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped, WordPress.WP.I18n.NonSingularStringLiteralText;?></div><div class="wdk_marker-card"><div class="wdk_marker-arrow"></div></div></div>';
249 269 <?php else:?>
250 - var innerMarker = '<div class="wdk_marker-container category_id_<?php echo esc_js(wdk_field_value('category_id', $wdk_listing_id));?>""><div class="front wdk_face"><i class="<?php echo esc_html($font_class);?>"></i></div><div class="wdk_marker-card"><div class="wdk_marker-arrow"></div></div></div>';
270 + var innerMarker = '<div class="wdk_marker-container category_id_<?php echo esc_js(wdk_field_value('category_id', $wdk_listing_id));?>""><div class="front wdk_face"><i class="<?php echo esc_attr($font_class);?>"></i></div><div class="wdk_marker-card"><div class="wdk_marker-arrow"></div></div></div>';
251 271 <?php endif;?>
252 272
253 273 <?php if($settings['conf_custom_popup_enable'] == 'yes'):?>
254 - marker = wdk_generate_marker_basic_popup('<?php echo esc_html($lat);?>','<?php echo esc_html($lng);?>',innerMarker,'<?php echo $wdk_popup_content;?>', wdk_jpopup_customOptions);
274 + marker = wdk_generate_marker_basic_popup('<?php echo esc_html($lat);?>','<?php echo esc_html($lng);?>',innerMarker,'<?php echo $wdk_popup_content; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped, WordPress.WP.I18n.NonSingularStringLiteralText?>', wdk_jpopup_customOptions);
255 275 <?php else:?>
256 276 marker = wdk_generate_marker_nopopup('<?php echo esc_html($lat);?>','<?php echo esc_html($lng);?>',innerMarker);
257 277 <?php endif;?>
258 278