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/controllers/Wdk_location.php +16 -6 1.5.6 → 1.5.9 View file →
@@ -139,9 +139,11 @@
139 139
140 140 /* translate */
141 141 $this->data['maps_list'] = array();
142 142 foreach ($maps_list as $location_key => $location) {
143 - $this->data['maps_list'][str_replace('.svg', '', $location_key)] = esc_html__($location, 'wdk-svg-map');
143 + // Dynamic field values are registered in the translation catalog separately.
144 +// phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText
145 + $this->data['maps_list'][str_replace('.svg', '', $location_key)] = esc_html__($location, 'wpdirectorykit');
144 146 }
145 147 }
146 148
147 149 $this->data['map_related_locations'] = array();
@@ -153,9 +155,11 @@
153 155
154 156 if(function_exists('run_wdk_svg_map')) {
155 157 if(wmvc_show_data('related_svg_map', $this->data['db_data'], false) && isset($maps_data[wmvc_show_data('related_svg_map', $this->data['db_data'])])) {
156 158 foreach ($maps_data[wmvc_show_data('related_svg_map', $this->data['db_data'])]['locations'] as $location_key => $location) {
157 - $this->data['map_related_locations'][$location_key] = esc_html__($location, 'wdk-svg-map');
159 + // Dynamic field values are registered in the translation catalog separately.
160 +// phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText
161 + $this->data['map_related_locations'][$location_key] = esc_html__($location, 'wpdirectorykit');
158 162 }
159 163
160 164 asort($this->data['map_related_locations']);
161 165 }
@@ -220,9 +224,9 @@
220 224 public function import_from_svg()
221 225 {
222 226
223 227 if(!function_exists('run_wdk_svg_map')) {
224 - exit(esc_html__('Addon WDK SVG Map missing', 'wdk-svg-map'));
228 + exit(esc_html__('Addon WDK SVG Map missing', 'wpdirectorykit'));
225 229 }
226 230
227 231 $this->load->model('location_m');
228 232
@@ -242,9 +246,11 @@
242 246
243 247 /* translate */
244 248 $this->data['maps_list'] = array();
245 249 foreach ($maps_data as $location_key => $location) {
246 - $this->data['maps_list'][str_replace('.svg', '', $location_key)] = esc_html__($location, 'wdk-svg-map');
250 + // Dynamic field values are registered in the translation catalog separately.
251 +// phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText
252 + $this->data['maps_list'][str_replace('.svg', '', $location_key)] = esc_html__($location, 'wpdirectorykit');
247 253 }
248 254
249 255 $this->data['db_data'] = NULL;
250 256
@@ -282,10 +288,14 @@
282 288
283 289 if(isset($maps_data[strtolower(wmvc_show_data('related_svg_map',$data))])) {
284 290 $insert_data = array('parent_id' => wmvc_show_data('related_svg_map_location',$data, NULL));
285 291 foreach ($maps_data[strtolower(wmvc_show_data('related_svg_map',$data))]['locations'] as $location_key => $location) {
286 - if(!$this->location_m->get_by(array('parent_id'=>wmvc_show_data('related_svg_map_location',$data, NULL),'location_title'=>esc_html__($location, 'wdk-svg-map')), TRUE))
287 - $insert_id = $this->location_m->insert(array_merge($insert_data, array('location_title' => esc_html__($location, 'wdk-svg-map'))), NULL);
292 + // Dynamic field values are registered in the translation catalog separately.
293 +// phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText
294 +if(!$this->location_m->get_by(array('parent_id'=>wmvc_show_data('related_svg_map_location',$data, NULL),'location_title'=>esc_html__($location, 'wpdirectorykit')), TRUE))
295 + // Dynamic field values are registered in the translation catalog separately.
296 +// phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText
297 + $insert_id = $this->location_m->insert(array_merge($insert_data, array('location_title' => esc_html__($location, 'wpdirectorykit'))), NULL);
288 298 }
289 299 }
290 300
291 301 }