PluginProbe
Easy Elements for Elementor – Addons & Website Templates / 1.3.7
Easy Elements for Elementor – Addons & Website Templates v1.3.7
1.5.3 1.5.2 1.5.1 1.5.0 1.4.9 1.4.6 1.4.7 1.4.8 1.4.5 1.4.4 1.4.3 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.7 1.3.8 1.3.9 1.4.0 All 47 releases
easy-elements / widgets / counter / counter.php

counter.php in Easy Elements for Elementor – Addons & Website Templates 1.3.7, at widgets/counter/counter.php

759 lines 20.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Easyel\EasyElements\Widgets;
3 use Elementor\Controls_Manager;
4 use Elementor\Group_Control_Typography;
5 use Elementor\Group_Control_Text_Stroke;
6
7 defined('ABSPATH') || die();
8
9 class Easyel_Counter_Widget extends \Elementor\Widget_Base {
10
11
12 public function get_name() {
13 return 'eel-counter';
14 }
15
16 public function get_title() {
17 return __( 'Counter', 'easy-elements' );
18 }
19
20 public function get_icon() {
21 return 'easyicon easyelIcon-counter';
22 }
23
24 public function get_categories() {
25 return [ 'easyelements_category' ];
26 }
27
28 public function get_keywords() {
29 return [ 'counter', 'funfact', 'counterup', 'count', 'text' ];
30 }
31
32 public function get_style_depends() {
33 return [
34 'eel-counter',
35 ];
36 }
37
38 public function get_script_depends() {
39 return [
40 'eel-counter',
41 ];
42 }
43
44 protected function register_controls()
45 {
46 $this->start_controls_section(
47 'section_counter',
48 [
49 'label' => esc_html__('Counter', 'easy-elements'),
50 ]
51 );
52
53 $this->add_control(
54 'number',
55 [
56 'label' => esc_html__('Ending Number', 'easy-elements'),
57 'type' => Controls_Manager::NUMBER,
58 'default' => 500,
59 'dynamic' => [
60 'active' => true,
61 ],
62 ]
63 );
64
65 $this->add_control(
66 'prefix',
67 [
68 'label' => esc_html__('Number Prefix', 'easy-elements'),
69 'type' => Controls_Manager::TEXT,
70 'default' => '',
71 'dynamic' => [
72 'active' => true,
73 ],
74 ]
75 );
76
77 $this->add_control(
78 'suffix',
79 [
80 'label' => esc_html__('Number Suffix', 'easy-elements'),
81 'type' => Controls_Manager::TEXT,
82 'default' => '',
83 'dynamic' => [
84 'active' => true,
85 ],
86 ]
87 );
88
89 $this->add_control(
90 'duration',
91 [
92 'label' => esc_html__('Animation Duration (ms)', 'easy-elements'),
93 'type' => Controls_Manager::NUMBER,
94 'default' => 1000,
95 'placeholder' => 'Suffix',
96 ]
97 );
98
99 $this->add_control(
100 'format',
101 [
102 'label' => __('Separator', 'easy-elements'),
103 'type' => \Elementor\Controls_Manager::SELECT,
104 'default' => 'default',
105 'options' => [
106 'default' => __('Default', 'easy-elements'),
107 'comma' => __('Comma', 'easy-elements'),
108 'dot' => __('Dot', 'easy-elements'),
109 'space' => __('Space', 'easy-elements'),
110 'underline' => __('Underline', 'easy-elements'),
111 ],
112 ]
113 );
114
115 $this->add_control(
116 'cnt-icon-enable',
117 [
118 'label' => esc_html__( 'Icon Show', 'easy-elements' ),
119 'type' => Controls_Manager::SWITCHER,
120 'label_on' => esc_html__( 'Yes', 'easy-elements' ),
121 'label_off' => esc_html__( 'No', 'easy-elements' ),
122 'return_value' => 'yes',
123 'default' => 'no',
124 ]
125 );
126
127 $this->add_control(
128 'cnt-icon',
129 [
130 'label' => esc_html__( 'Icon', 'easy-elements' ),
131 'type' => \Elementor\Controls_Manager::ICONS,
132 'default' => [
133 'value' => 'fas fa-layer-group',
134 'library' => 'fa-solid',
135 ],
136 'condition' => [
137 'cnt-icon-enable' => 'yes',
138 ]
139 ]
140 );
141
142 $this->add_control(
143 'title',
144 [
145 'label' => esc_html__('Title', 'easy-elements'),
146 'type' => Controls_Manager::TEXT,
147 'placeholder' => esc_html__('Label', 'easy-elements'),
148 'default' => esc_html__('Easy Elements', 'easy-elements'),
149 'label_block' => 'true',
150 'dynamic' => [
151 'active' => true,
152 ],
153 ]
154 );
155
156 $this->add_control(
157 'title_tag',
158 [
159 'label' => esc_html__('Select Title Tag', 'easy-elements'),
160 'type' => Controls_Manager::SELECT,
161 'default' => 'span',
162 'options' => [
163 'h1' => esc_html__('H1', 'easy-elements'),
164 'h2' => esc_html__('H2', 'easy-elements'),
165 'h3' => esc_html__('H3', 'easy-elements'),
166 'h4' => esc_html__('H4', 'easy-elements'),
167 'h5' => esc_html__('H5', 'easy-elements'),
168 'h6' => esc_html__('H6', 'easy-elements'),
169 'p' => esc_html__('P', 'easy-elements'),
170 'div' => esc_html__('div', 'easy-elements'),
171 'span' => esc_html__('span', 'easy-elements'),
172 ],
173 ]
174 );
175 $this->end_controls_section();
176
177 $this->start_controls_section(
178 'counter_styles',
179 [
180 'label' => esc_html__('Counter', 'easy-elements'),
181 'tab' => Controls_Manager::TAB_STYLE,
182 ]
183 );
184
185 $this->add_responsive_control(
186 'content_align',
187 [
188 'label' => esc_html__( 'Content Alignment', 'easy-elements' ),
189 'type' => \Elementor\Controls_Manager::CHOOSE,
190 'options' => [
191 'left' => [
192 'title' => esc_html__( 'Left', 'easy-elements' ),
193 'icon' => 'eicon-text-align-left',
194 ],
195 'center' => [
196 'title' => esc_html__( 'Center', 'easy-elements' ),
197 'icon' => 'eicon-text-align-center',
198 ],
199 'right' => [
200 'title' => esc_html__( 'Right', 'easy-elements' ),
201 'icon' => 'eicon-text-align-right',
202 ],
203 ],
204 'toggle' => true,
205 'selectors' => [
206 '{{WRAPPER}} .eel-cnt-wrap' => 'text-align: {{VALUE}};',
207 '{{WRAPPER}} .eel-cnt-number-wrap' => 'justify-content: {{VALUE}};',
208 ],
209 ]
210 );
211
212 $this->add_responsive_control(
213 'content_gap',
214 [
215 'label' => esc_html__( 'Content Gap', 'easy-elements' ),
216 'type' => \Elementor\Controls_Manager::SLIDER,
217 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
218 'selectors' => [
219 '{{WRAPPER}} .eel-cnt-title' => 'margin-top: {{SIZE}}{{UNIT}};',
220 ],
221 ]
222 );
223
224 $this->add_responsive_control(
225 'sub_pre_gap',
226 [
227 'label' => esc_html__( 'Prefix Suffix Gap', 'easy-elements' ),
228 'type' => \Elementor\Controls_Manager::SLIDER,
229 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
230 'selectors' => [
231 '{{WRAPPER}} .eel-cnt-number-wrap' => 'gap: {{SIZE}}{{UNIT}};',
232 ],
233 'conditions' => [
234 'relation' => 'or',
235 'terms' => [
236 [
237 'name' => 'prefix',
238 'operator' => '!=',
239 'value' => '',
240 ],
241 [
242 'name' => 'suffix',
243 'operator' => '!=',
244 'value' => '',
245 ],
246 ],
247 ],
248 ]
249 );
250
251 $this->add_responsive_control(
252 'wrap_df_hrzn_align',
253 [
254 'label' => esc_html__( 'Horizontal Alignment', 'easy-elements' ),
255 'type' => \Elementor\Controls_Manager::CHOOSE,
256 'options' => [
257 'start' => [
258 'title' => esc_html__( 'Start', 'easy-elements' ),
259 'icon' => 'eicon-h-align-left',
260 ],
261 'center' => [
262 'title' => esc_html__( 'Center', 'easy-elements' ),
263 'icon' => 'eicon-h-align-center',
264 ],
265 'end' => [
266 'title' => esc_html__( 'End', 'easy-elements' ),
267 'icon' => 'eicon-h-align-right',
268 ],
269 ],
270 'toggle' => true,
271 'selectors' => [
272 '{{WRAPPER}} .eel-cnt-wrap' => 'align-items: {{VALUE}};',
273 ],
274 'condition' => [
275 'cnt-icon-enable!' => 'yes',
276 ]
277 ]
278 );
279
280 $this->add_responsive_control(
281 'icon_position',
282 [
283 'label' => esc_html__( 'Icon Position', 'easy-elements' ),
284 'type' => \Elementor\Controls_Manager::CHOOSE,
285 'separator' => 'before',
286 'default' => 'top',
287 'options' => [
288 'left' => [
289 'title' => esc_html__( 'Left', 'easy-elements' ),
290 'icon' => 'eicon-h-align-left',
291 ],
292 'top' => [
293 'title' => esc_html__( 'Top', 'easy-elements' ),
294 'icon' => 'eicon-v-align-top',
295 ],
296 'bottom' => [
297 'title' => esc_html__( 'Bottom', 'easy-elements' ),
298 'icon' => 'eicon-v-align-bottom',
299 ],
300 'right' => [
301 'title' => esc_html__( 'Right', 'easy-elements' ),
302 'icon' => 'eicon-h-align-right',
303 ],
304 ],
305 'toggle' => true,
306 'prefix_class' => 'eel-cnt-icon-pos-',
307 'condition' => [
308 'cnt-icon-enable' => 'yes',
309 ]
310 ]
311 );
312
313 $this->add_responsive_control(
314 'wrap_vrt_lr_align',
315 [
316 'label' => esc_html__( 'Vertical Alignment', 'easy-elements' ),
317 'type' => \Elementor\Controls_Manager::CHOOSE,
318 'options' => [
319 'start' => [
320 'title' => esc_html__( 'Top', 'easy-elements' ),
321 'icon' => 'eicon-h-align-left',
322 ],
323 'center' => [
324 'title' => esc_html__( 'Middle', 'easy-elements' ),
325 'icon' => 'eicon-h-align-center',
326 ],
327 'end' => [
328 'title' => esc_html__( 'Bottom', 'easy-elements' ),
329 'icon' => 'eicon-h-align-right',
330 ],
331 ],
332 'toggle' => true,
333 'selectors' => [
334 '{{WRAPPER}} .eel-cnt-wrap' => 'align-items: {{VALUE}};',
335 ],
336 'condition' => [
337 'icon_position' => [ 'left', 'right' ],
338 'cnt-icon-enable' => 'yes',
339 ],
340 ]
341 );
342
343 $this->add_responsive_control(
344 'wrap_hrzn_tb_alig',
345 [
346 'label' => esc_html__( 'Horizontal Alignment', 'easy-elements' ),
347 'type' => \Elementor\Controls_Manager::CHOOSE,
348 'options' => [
349 'start' => [
350 'title' => esc_html__( 'Start', 'easy-elements' ),
351 'icon' => 'eicon-h-align-left',
352 ],
353 'center' => [
354 'title' => esc_html__( 'Center', 'easy-elements' ),
355 'icon' => 'eicon-h-align-center',
356 ],
357 'end' => [
358 'title' => esc_html__( 'End', 'easy-elements' ),
359 'icon' => 'eicon-h-align-right',
360 ],
361 ],
362 'toggle' => true,
363 'selectors' => [
364 '{{WRAPPER}} .eel-cnt-wrap' => 'align-items: {{VALUE}};',
365 ],
366 'condition' => [
367 'icon_position' => [ 'top', 'bottom' ],
368 'cnt-icon-enable' => 'yes',
369 ]
370 ]
371 );
372
373 $this->add_responsive_control(
374 'wrap_hrzn_lr_align',
375 [
376 'label' => esc_html__( 'Horizontal Alignment', 'easy-elements' ),
377 'type' => \Elementor\Controls_Manager::CHOOSE,
378 'options' => [
379 'start' => [
380 'title' => esc_html__( 'Start', 'easy-elements' ),
381 'icon' => 'eicon-h-align-left',
382 ],
383 'center' => [
384 'title' => esc_html__( 'Center', 'easy-elements' ),
385 'icon' => 'eicon-h-align-center',
386 ],
387 'end' => [
388 'title' => esc_html__( 'End', 'easy-elements' ),
389 'icon' => 'eicon-h-align-right',
390 ],
391 'space-between' => [
392 'title' => esc_html__( 'Stretch', 'easy-elements' ),
393 'icon' => 'eicon-grow',
394 ],
395 ],
396 'toggle' => true,
397 'selectors' => [
398 '{{WRAPPER}} .eel-cnt-wrap' => 'justify-content: {{VALUE}};',
399 ],
400 'condition' => [
401 'icon_position' => [ 'left', 'right' ],
402 'cnt-icon-enable' => 'yes',
403 ],
404 ]
405 );
406
407 $this->add_responsive_control(
408 'icon_gap',
409 [
410 'label' => esc_html__( 'Icon Gap', 'easy-elements' ),
411 'type' => \Elementor\Controls_Manager::SLIDER,
412 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
413 'selectors' => [
414 '{{WRAPPER}} .eel-cnt-wrap' => 'gap: {{SIZE}}{{UNIT}};',
415 ],
416 'condition' => [
417 'cnt-icon-enable' => 'yes',
418 ]
419 ]
420 );
421
422 $this->end_controls_section();
423
424 $this->start_controls_section(
425 'section_number',
426 [
427 'label' => esc_html__('Number', 'easy-elements'),
428 'tab' => Controls_Manager::TAB_STYLE,
429 'condition' => [
430 'number!' => ''
431 ]
432 ]
433 );
434
435 $this->add_control(
436 'number_color',
437 [
438 'label' => esc_html__('Color', 'easy-elements'),
439 'type' => Controls_Manager::COLOR,
440 'selectors' => [
441 '{{WRAPPER}} .eel-cnt-number-wrap' => 'color: {{VALUE}};',
442 ],
443 ]
444 );
445
446 $this->add_group_control(
447 Group_Control_Typography::get_type(),
448 [
449 'label' => esc_html__('Typography', 'easy-elements'),
450 'name' => 'number_typography',
451 'selector' => '{{WRAPPER}} .eel-cnt-number-wrap',
452 ]
453 );
454
455 $this->add_group_control(
456 \Elementor\Group_Control_Text_Stroke::get_type(),
457 [
458 'name' => 'number_stroke',
459 'selector' => '{{WRAPPER}} .eel-cnt-number-wrap',
460 ]
461 );
462
463 $this->add_group_control(
464 \Elementor\Group_Control_Text_Shadow::get_type(),
465 [
466 'name' => 'number_text_shadow',
467 'label' => esc_html__('Text Shadow', 'easy-elements'),
468 'selector' => '{{WRAPPER}} .eel-cnt-number-wrap',
469 ]
470 );
471 $this->end_controls_section();
472
473 $this->start_controls_section(
474 'prefix_styles',
475 [
476 'label' => esc_html__('Prefix', 'easy-elements'),
477 'tab' => Controls_Manager::TAB_STYLE,
478 'condition' => [
479 'prefix!' => '',
480 ]
481 ]
482 );
483 $this->add_control(
484 'prefix_color',
485 [
486 'label' => esc_html__('Color', 'easy-elements'),
487 'type' => Controls_Manager::COLOR,
488 'selectors' => [
489 '{{WRAPPER}} .eel-cnt-prefix' => 'color: {{VALUE}};',
490 ],
491 ]
492 );
493 $this->add_group_control(
494 Group_Control_Typography::get_type(),
495 [
496 'label' => esc_html__('Typography', 'easy-elements'),
497 'name' => 'prefix_typography',
498 'selector' => '{{WRAPPER}} .eel-cnt-prefix',
499 ]
500 );
501
502 $this->add_group_control(
503 \Elementor\Group_Control_Text_Shadow::get_type(),
504 [
505 'name' => 'prefix_text_shadow',
506 'label' => esc_html__('Text Shadow', 'easy-elements'),
507 'selector' => '{{WRAPPER}} .eel-cnt-prefix',
508 ]
509 );
510 $this->end_controls_section();
511
512 $this->start_controls_section(
513 'suffix_styles',
514 [
515 'label' => esc_html__('Suffix', 'easy-elements'),
516 'tab' => Controls_Manager::TAB_STYLE,
517 'condition' => [
518 'suffix!' => '',
519 ]
520 ]
521 );
522
523 $this->add_control(
524 'suffix_color',
525 [
526 'label' => esc_html__('Color', 'easy-elements'),
527 'type' => Controls_Manager::COLOR,
528 'selectors' => [
529 '{{WRAPPER}} .eel-cnt-suffix' => 'color: {{VALUE}};',
530 ],
531 ]
532 );
533
534 $this->add_group_control(
535 Group_Control_Typography::get_type(),
536 [
537 'label' => esc_html__('Typography', 'easy-elements'),
538 'name' => 'suffix_typography',
539 'selector' => '{{WRAPPER}} .eel-cnt-suffix',
540 ]
541 );
542
543 $this->add_group_control(
544 \Elementor\Group_Control_Text_Shadow::get_type(),
545 [
546 'name' => 'suffix_text_shadow',
547 'label' => esc_html__('Text Shadow', 'easy-elements'),
548 'selector' => '{{WRAPPER}} .eel-cnt-suffix',
549 ]
550 );
551 $this->end_controls_section();
552
553 $this->start_controls_section(
554 'title_styles',
555 [
556 'label' => esc_html__('Title', 'easy-elements'),
557 'tab' => Controls_Manager::TAB_STYLE,
558 'condition' => [
559 'title!' => '',
560 ]
561 ]
562 );
563
564 $this->add_control(
565 'title_color',
566 [
567 'label' => esc_html__('Color', 'easy-elements'),
568 'type' => Controls_Manager::COLOR,
569 'selectors' => [
570 '{{WRAPPER}} .eel-cnt-title' => 'color: {{VALUE}};',
571 ],
572 ]
573 );
574
575 $this->add_group_control(
576 Group_Control_Typography::get_type(),
577 [
578 'label' => esc_html__('Typography', 'easy-elements'),
579 'name' => 'title_typography',
580 'selector' => '{{WRAPPER}} .eel-cnt-title',
581 ]
582 );
583
584 $this->add_group_control(
585 \Elementor\Group_Control_Text_Shadow::get_type(),
586 [
587 'name' => 'title_text_shadow',
588 'label' => esc_html__('Text Shadow', 'easy-elements'),
589 'selector' => '{{WRAPPER}} .eel-cnt-title',
590 ]
591 );
592 $this->end_controls_section();
593
594 $this->start_controls_section(
595 'icon_style',
596 [
597 'label' => esc_html__('Icon', 'easy-elements'),
598 'tab' => Controls_Manager::TAB_STYLE,
599 'condition' => [
600 'cnt-icon-enable' => 'yes',
601 ]
602 ]
603 );
604
605 $this->add_control(
606 'icon_color',
607 [
608 'label' => esc_html__('Color', 'easy-elements'),
609 'type' => Controls_Manager::COLOR,
610 'selectors' => [
611 '{{WRAPPER}} .eel-cnt-icon svg' => 'fill: {{VALUE}};',
612 '{{WRAPPER}} .eel-cnt-icon svg path' => 'fill: {{VALUE}};',
613 '{{WRAPPER}} .eel-cnt-icon i' => 'color: {{VALUE}};',
614 ],
615 ]
616 );
617
618 $this->add_control(
619 'icon_bgcolor',
620 [
621 'label' => esc_html__('Background', 'easy-elements'),
622 'type' => Controls_Manager::COLOR,
623 'selectors' => [
624 '{{WRAPPER}} .eel-cnt-icon' => 'background: {{VALUE}};',
625 ],
626 ]
627 );
628
629 $this->add_responsive_control(
630 'icon_box_size',
631 [
632 'label' => esc_html__( 'Size', 'easy-elements' ),
633 'type' => \Elementor\Controls_Manager::SLIDER,
634 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
635 'range' => [
636 'px' => [
637 'min' => 0,
638 'max' => 100,
639 'step' => 0,
640 ],
641 '%' => [
642 'min' => 0,
643 'max' => 100,
644 ],
645 ],
646 'selectors' => [
647 '{{WRAPPER}} .eel-cnt-icon' => 'width: {{SIZE}}{{UNIT}} !important;height: {{SIZE}}{{UNIT}} !important;',
648 ],
649 ]
650 );
651
652 $this->add_responsive_control(
653 'icon_size',
654 [
655 'label' => esc_html__( 'Icon Size', 'easy-elements' ),
656 'type' => \Elementor\Controls_Manager::SLIDER,
657 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
658 'range' => [
659 'px' => [
660 'min' => 0,
661 'max' => 100,
662 'step' => 0,
663 ],
664 '%' => [
665 'min' => 0,
666 'max' => 100,
667 ],
668 ],
669 'selectors' => [
670 '{{WRAPPER}} .eel-cnt-icon svg' => 'width: {{SIZE}}{{UNIT}} !important;height: {{SIZE}}{{UNIT}} !important;',
671 '{{WRAPPER}} .eel-cnt-icon i' => 'font-size: {{SIZE}}{{UNIT}};',
672 ],
673 ]
674 );
675
676 $this->add_responsive_control(
677 'icon_border_radius',
678 [
679 'label' => esc_html__( 'Border Radius', 'easy-elements' ),
680 'type' => \Elementor\Controls_Manager::DIMENSIONS,
681 'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
682 'selectors' => [
683 '{{WRAPPER}} .eel-cnt-icon' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
684 ],
685 ]
686 );
687 $this->end_controls_section();
688 }
689
690 protected function render() {
691 $settings = $this->get_settings_for_display();
692 $number = !empty($settings['number']) ? $settings['number'] : 0;
693 $prefix = !empty($settings['prefix']) ? $settings['prefix'] : '';
694 $suffix = !empty($settings['suffix']) ? $settings['suffix'] : '';
695 $title = !empty($settings['title']) ? $settings['title'] : '';
696 $title_tag = !empty($settings['title_tag']) ? $settings['title_tag'] : 'h3';
697
698 $duration = !empty($settings['duration']) ? intval($settings['duration']) : 1000;
699 $format = !empty($settings['format']) ? $settings['format'] : 'default';
700
701 $icon_enabled = !empty($settings['cnt-icon-enable']) && $settings['cnt-icon-enable'] === 'yes';
702 $icon = $icon_enabled && !empty($settings['cnt-icon']['value']) ? $settings['cnt-icon'] : false;
703
704 // Add inline editing
705 $this->add_inline_editing_attributes('prefix', 'basic');
706 $this->add_render_attribute('prefix', 'class', 'eel-cnt-prefix');
707
708 $this->add_inline_editing_attributes('suffix', 'basic');
709 $this->add_render_attribute('suffix', 'class', 'eel-cnt-suffix');
710 ?>
711 <div class="eel-cnt-wrap">
712
713 <?php if ($icon) : ?>
714 <div class="eel-cnt-icon">
715 <?php \Elementor\Icons_Manager::render_icon($icon, [ 'aria-hidden' => 'true' ]); ?>
716 </div>
717 <?php endif; ?>
718
719 <div class="eel-cnt-content">
720
721 <?php if ($number !== '') : ?>
722 <div class="eel-cnt-number-wrap">
723
724 <?php if ($prefix !== '') :
725 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Safe, output contains trusted HTML attributes. ?>
726 <span <?php echo $this->print_render_attribute_string('prefix'); ?>>
727 <?php echo esc_html($prefix); ?>
728 </span>
729 <?php endif; ?>
730
731 <span class="eel-cnt-number eel-counter"
732 data-count="<?php echo esc_attr($number); ?>"
733 data-duration="<?php echo esc_attr($duration); ?>"
734 data-format="<?php echo esc_attr($format); ?>">
735 0
736 </span>
737
738 <?php if ($suffix !== '') :
739 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Safe, output contains trusted HTML attributes. ?>
740 <span <?php echo $this->print_render_attribute_string('suffix'); ?>>
741 <?php echo esc_html($suffix); ?>
742 </span>
743 <?php endif; ?>
744
745 </div>
746 <?php endif; ?>
747
748 <?php if ($title !== '') : ?>
749 <<?php echo esc_attr($title_tag); ?> class="eel-cnt-title">
750 <?php echo wp_kses_post($title); ?>
751 </<?php echo esc_attr($title_tag); ?>>
752 <?php endif; ?>
753
754 </div>
755 </div>
756 <?php
757 }
758 }
759