← All changes
|
includes/widgets/Smooth_Counter/Smooth_Counter.php
+4
-4
51.1.35
→
51.1.83
View file →
| @@ -484,9 +484,9 @@ | ||
| 484 | 484 | } |
| 485 | 485 | |
| 486 | 486 | protected function render(): void |
| 487 | 487 | { |
| 488 | - $settings = $this->get_settings(); | |
| 488 | + $settings = Core::displaySettings($this); | |
| 489 | 489 | $id = $this->get_id(); |
| 490 | 490 | |
| 491 | 491 | echo '<div class="king-addons-smooth-counter">'; |
| 492 | 492 | |
| @@ -509,14 +509,14 @@ | ||
| 509 | 509 | $inline_js = "(function ($) { |
| 510 | 510 | function doSmoothCounter() { |
| 511 | 511 | let od = new Odometer({ |
| 512 | 512 | el: document.querySelector('.king-addons-smooth-counter-" . esc_js($id) . "'), |
| 513 | - value: " . esc_js($settings['king_addons_smooth_counter_start']) . ", | |
| 513 | + value: " . Core::jsNumber($settings, 'king_addons_smooth_counter_start', 100) . ", | |
| 514 | 514 | format: '" . esc_js($settings['king_addons_smooth_counter_format']) . "', |
| 515 | - duration: " . esc_js($settings['king_addons_smooth_counter_anim_duration']) . ", | |
| 515 | + duration: " . Core::jsNumber($settings, 'king_addons_smooth_counter_anim_duration', 600) . ", | |
| 516 | 516 | theme: 'minimal', |
| 517 | 517 | }); |
| 518 | - od.update(" . esc_js($settings['king_addons_smooth_counter_finish']) . ") | |
| 518 | + od.update(" . Core::jsNumber($settings, 'king_addons_smooth_counter_finish', 999) . ") | |
| 519 | 519 | } |
| 520 | 520 | |
| 521 | 521 | function onIntersection(entries, observer) { |
| 522 | 522 | entries.forEach(entry => { |