PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.8.2
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.8.2
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
formidable / classes / views / dashboard / templates / counters.php

counters.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More 6.8.2, at classes/views/dashboard/templates/counters.php

38 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 die( 'You are not allowed to call this page directly.' );
4 }
5
6 $classname = 'frm-counter-card-wrapper frm-flex-box';
7 ?>
8
9 <?php if ( ! empty( $template ) && isset( $template['counters'] ) && is_array( $template['counters'] ) ) : ?>
10 <div class="<?php echo esc_attr( $classname ); ?>">
11
12 <?php foreach ( $template['counters'] as $counter ) : ?>
13 <div class="frm-counter-card frm-dashboard-widget frm-card-item">
14 <h4><?php echo esc_html( $counter['heading'] ); ?></h4>
15 <?php if ( isset( $counter['cta'] ) && isset( $counter['cta']['display'] ) && true === $counter['cta']['display'] ) : ?>
16 <a href="<?php echo esc_url( $counter['cta']['link'] ); ?>"><?php echo esc_attr( $counter['cta']['title'] ); ?></a>
17 <?php else : ?>
18 <?php if ( 'currency' === $counter['type'] ) : ?>
19 <div class="frm-flex-box frm-gap-md">
20 <?php foreach ( $counter['items'] as $item ) : ?>
21 <b>
22 <?php echo esc_attr( $item['counter_label']['symbol_left'] ); ?>
23 <span class="frm-counter" data-type="<?php echo esc_attr( $counter['type'] ); ?>" data-locale="<?php echo esc_attr( get_locale() ); ?>" data-counter="<?php echo (int) $item['counter']; ?>"><?php echo (int) $item['counter']; ?></span>
24 <?php echo esc_attr( $item['counter_label']['symbol_right'] ); ?>
25 </b>
26 <?php endforeach; ?>
27 </div>
28 <?php else : ?>
29 <b>
30 <span class="frm-counter" data-type="<?php echo esc_attr( $counter['type'] ); ?>" data-locale="<?php echo esc_attr( get_locale() ); ?>" data-counter="<?php echo (int) $counter['counter']; ?>"><?php echo (int) $counter['counter']; ?></span>
31 </b>
32 <?php endif; ?>
33 <?php endif; ?>
34 </div>
35 <?php endforeach; ?>
36 </div>
37 <?php endif; ?>
38