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/classes/wdk-field-value.php +18 -3 1.5.4 → 1.5.9 View file →
@@ -173,8 +173,11 @@
173 173 } else {
174 174 $this->data['field_value'] = '<span class="field_checkbox_unsuccess">' . $this->generate_icon($this->data['settings']['field_checkbox_icon_unsuccess']) . '</span>';
175 175 }
176 176 } else if (wdk_field_option($this->data['settings']['field_id'], 'field_type') == "INPUTBOX") {
177 +
178 + // Dynamic field values are registered in the translation catalog separately.
179 + // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText
177 180 $this->data['field_value'] = __(wdk_field_value($this->data['settings']['field_id'], $wdk_listing_id, wdk_field_option($this->data['settings']['field_id'], 'empty_value')), 'wpdirectorykit');
178 181
179 182 if (strpos($this->data['field_value'], 'vimeo.com') !== FALSE) {
180 183 $this->data['field_value'] = wp_oembed_get($this->data['field_value'], array("width" => "800", "height" => "450"));
@@ -228,8 +231,10 @@
228 231 if (!empty($other_categories))
229 232 $this->data['field_value'] .= ', ' . join(', ', $other_categories);
230 233 }
231 234
235 + // Dynamic field values are registered in the translation catalog separately.
236 +// phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText
232 237 $this->data['field_value'] = __($this->data['field_value'], 'wpdirectorykit');
233 238 }
234 239 } elseif ($this->data['settings']['field_id'] == 'location_id') {
235 240 if (wdk_field_value($this->data['settings']['field_id'], $wdk_listing_id)) {
@@ -243,13 +248,19 @@
243 248 if (!empty($other_locations))
244 249 $this->data['field_value'] .= ', ' . join(', ', $other_locations);
245 250 }
246 251
252 + // Dynamic field values are registered in the translation catalog separately.
253 + // phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText
247 254 $this->data['field_value'] = __($this->data['field_value'], 'wpdirectorykit');
248 255 }
249 256 } elseif (wdk_field_option($this->data['settings']['field_id'], 'field_type') == "DATE") {
257 + // Dynamic field values are registered in the translation catalog separately.
258 +// phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText
250 259 $this->data['field_value'] = __(wdk_get_date(wdk_field_value($this->data['settings']['field_id'], $wdk_listing_id)), 'wpdirectorykit');
251 260 } elseif (strpos($this->data['settings']['field_id'], 'date') !== FALSE) {
261 + // Dynamic field values are registered in the translation catalog separately.
262 +// phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText
252 263 $this->data['field_value'] = __(wdk_get_date(wdk_field_value($this->data['settings']['field_id'], $wdk_listing_id)), 'wpdirectorykit');
253 264 } elseif (
254 265 wdk_field_option($this->data['settings']['field_id'], 'field_type') == "TEXTAREA" ||
255 266 $this->data['settings']['field_id'] == 'post_content'
@@ -254,8 +265,10 @@
254 265 wdk_field_option($this->data['settings']['field_id'], 'field_type') == "TEXTAREA" ||
255 266 $this->data['settings']['field_id'] == 'post_content'
256 267 ) {
257 268 global $wp_embed;
269 + // Dynamic field values are registered in the translation catalog separately.
270 +// phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText
258 271 $this->data['field_value'] = wpautop(__(wdk_field_value($this->data['settings']['field_id'], $wdk_listing_id), 'wpdirectorykit'));
259 272 $this->data['field_value'] = html_entity_decode($wp_embed->autoembed($this->data['field_value']));
260 273 } elseif (
261 274 wdk_field_option($this->data['settings']['field_id'], 'field_type') == "FILEUPLOAD"
@@ -268,8 +281,10 @@
268 281 wp_enqueue_style('blueimp-gallery');
269 282 wp_enqueue_script('blueimp-gallery');
270 283 wp_enqueue_script('wdk-blueimp-gallery');
271 284 } else {
285 + // Dynamic field values are registered in the translation catalog separately.
286 +// phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText
272 287 $this->data['field_value'] = __(wdk_field_value($this->data['settings']['field_id'], $wdk_listing_id, wdk_field_option($this->data['settings']['field_id'], 'empty_value')), 'wpdirectorykit');
273 288 }
274 289 } else {
275 290 if (wdk_field_option($this->data['settings']['field_id'], 'field_type') == "CHECKBOX") {
@@ -318,13 +333,13 @@
318 333
319 334 /* price format implement */
320 335 if (function_exists('run_wdk_currency_conversion') && wdk_currencies_is_price_field($this->data['settings']['field_id'])) {
321 336 /* if currency_conversion and field is price */
322 - $value = strip_tags(apply_filters('wpdirectorykit/listing/field/value', wdk_filter_decimal($this->data['field_value']), $this->data['settings']['field_id'], FALSE));
337 + $value = wp_strip_all_tags(apply_filters('wpdirectorykit/listing/field/value', wdk_filter_decimal($this->data['field_value']), $this->data['settings']['field_id'], FALSE));
323 338 $this->data['field_value'] = esc_html(wdk_number_format_i18n($value));
324 339 } elseif (wdk_field_option($this->data['settings']['field_id'], 'is_price_format') && wdk_field_option($this->data['settings']['field_id'], 'field_type') == 'NUMBER' && !empty($this->data['field_value'])) {
325 340 /* if field enabled is_price_format and field type is number*/
326 - $value = strip_tags(apply_filters('wpdirectorykit/listing/field/value', wdk_filter_decimal($this->data['field_value']), $this->data['settings']['field_id'], FALSE));
341 + $value = wp_strip_all_tags(apply_filters('wpdirectorykit/listing/field/value', wdk_filter_decimal($this->data['field_value']), $this->data['settings']['field_id'], FALSE));
327 342 $this->data['field_value'] = esc_html(wdk_number_format_i18n($value));
328 343 } else {
329 344 /* without number format */
330 345 $this->data['field_value'] = apply_filters('wpdirectorykit/listing/field/value', $this->data['field_value'], $this->data['settings']['field_id']);
@@ -330,9 +345,9 @@
330 345 $this->data['field_value'] = apply_filters('wpdirectorykit/listing/field/value', $this->data['field_value'], $this->data['settings']['field_id']);
331 346 }
332 347 }
333 348
334 - echo $this->view('wdk-field-value', $this->data);
349 + $this->view('wdk-field-value', $this->data, true);
335 350 }
336 351
337 352 private function _generate_label()
338 353 {