PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
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 / welcome-tour / steps / list.php

list.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More trunk, at classes/views/welcome-tour/steps/list.php

61 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Welcome Tour's Individual step view.
4 *
5 * @since 6.25.1
6 *
7 * @package Formidable
8 */
9
10 if ( ! defined( 'ABSPATH' ) ) {
11 die( 'You are not allowed to call this page directly.' );
12 }
13
14 if ( ! is_array( $steps ) ) {
15 return;
16 }
17
18 foreach ( $steps as $key => $step ) {
19 $is_active = $active_step === $key;
20 $step_attrs = array(
21 'id' => 'frm-checklist__step-' . $key,
22 'class' => 'frm-checklist__step',
23 );
24
25 if ( $is_active ) {
26 $step_attrs['class'] .= ' frm-checklist__step--active';
27 }
28
29 if ( $step['completed'] ) {
30 $step_attrs['class'] .= ' frm-checklist__step--completed';
31 }
32
33 if ( ! empty( $step['link'] ) ) {
34 $step_attrs['data-link'] = $step['link'];
35 }
36
37 $active_step_url = $is_active && in_array( $active_step, array( 'style-form', 'embed-form' ), true )
38 ? FrmStylesHelper::get_list_url( $current_form_id )
39 : '';
40 ?>
41 <div <?php FrmAppHelper::array_to_html_params( $step_attrs, true ); ?>>
42 <div class="frm-checklist__step-title frm-h-stack-xs frm-p-sm">
43 <?php if ( $active_step_url ) { ?>
44 <a class="frm-h-stack-xs" href="<?php echo esc_url( $active_step_url ); ?>">
45 <?php } ?>
46 <span class="frm-checklist__step-status frm-flex-center">
47 <?php FrmAppHelper::icon_by_class( 'frmfont frm_checkmark_icon frm_svg7 frm-text-white', array( 'aria-hidden' => 'true' ) ); ?>
48 </span>
49 <span class=" frm-leading-none"><?php echo esc_html( $step['title'] ); ?></span>
50 <?php if ( $active_step_url ) { ?>
51 </a>
52 <?php } ?>
53 </div>
54
55 <div class="frm-checklist__step-description frm-flex frm-p-xs frm-mx-xs -frm-mt-2xs">
56 <span><?php echo esc_html( $step['description'] ); ?></span>
57 </div>
58 </div>
59 <?php
60 }//end foreach
61