PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.32.1
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.32.1
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 / spotlight.php

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

53 lines 1.7 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 Spotlight component.
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 ( empty( $spotlight['target'] ) ) {
15 return;
16 }
17
18 $placement = $spotlight['placement'] ?? 'right';
19 $spotlight_attributes = array(
20 'class' => 'frm-spotlight frm-welcome-tour-spotlight frm-gap-xs frm-items-center frm-force-hidden frm-fadein',
21 'data-target' => $spotlight['target'],
22 'data-left-position' => $spotlight['left-position'] ?? 'end',
23 'data-placement' => $placement,
24 'style' => '',
25 );
26 $spotlight_attributes['class'] .= 'bottom' === $placement ? ' frm-flex-col' : ' frm-flex';
27
28 if ( ! empty( $spotlight['offset']['top'] ) ) {
29 $spotlight_attributes['style'] .= 'margin-top: ' . $spotlight['offset']['top'] . 'px;';
30 }
31
32 if ( ! empty( $spotlight['offset']['left'] ) ) {
33 $spotlight_attributes['style'] .= 'margin-left: ' . $spotlight['offset']['left'] . 'px;';
34 }
35 ?>
36 <div <?php FrmAppHelper::array_to_html_params( $spotlight_attributes, true ); ?>>
37 <div class="frm-spotlight__pointer frm-flex-center frm-fadein-up-back frm-pulse"></div>
38
39 <div class="frm-spotlight__content frm-flex-col frm-justify-center frm-gap-xs frmcenter frm-bg-white frm-p-sm frm-rounded-md frm-box-shadow-xxl frm-fadein-up-back">
40 <?php if ( ! empty( $spotlight['title'] ) ) { ?>
41 <h3 class="frm-text-xs frm-font-bold frm-text-grey-800 frm-m-0">
42 <?php echo esc_html( $spotlight['title'] ); ?>
43 </h3>
44 <?php } ?>
45
46 <?php if ( ! empty( $spotlight['description'] ) ) { ?>
47 <p class="frm-text-xs frm-text-grey-700 frm-m-0">
48 <?php echo esc_html( $spotlight['description'] ); ?>
49 </p>
50 <?php } ?>
51 </div>
52 </div>
53