PluginProbe ʕ •ᴥ•ʔ
Premium Addons for Elementor – Powerful Elementor Templates & Widgets / 4.11.84
Premium Addons for Elementor – Powerful Elementor Templates & Widgets v4.11.84
4.11.84 4.11.83 4.11.82 4.11.80 4.11.81 4.11.79 4.11.78 4.11.77 4.11.76 4.11.75 3.20.5 4.11.69 3.20.6 4.11.7 3.20.7 4.11.70 3.20.8 4.11.71 3.20.9 4.11.72 3.21.1 4.11.73 3.21.2 4.11.74 3.21.3 4.11.8 3.21.4 4.11.9 3.21.5 4.2.0 3.21.6 4.2.1 3.3.0 4.2.2 3.3.1 4.2.3 3.3.2 4.2.4 3.3.3 4.2.5 3.3.4 4.2.6 3.3.5 4.2.7 3.3.6 4.2.8 3.3.7 4.2.9 3.3.8 4.3.0 3.3.9 4.3.1 3.4.0 4.3.2 3.4.1 4.3.3 3.4.2 4.3.4 3.4.3 4.3.5 3.4.4 4.3.6 3.4.5 4.3.7 3.4.6 4.3.8 3.4.7 4.3.9 3.4.8 4.4.0 3.4.9 4.4.1 3.5.0 4.4.2 3.5.1 4.4.3 3.5.2 4.4.4 3.5.3 4.4.5 3.5.4 4.4.6 3.5.5 4.4.7 3.5.6 4.4.8 3.5.7 4.4.9 3.5.8 4.5.0 3.5.9 4.5.1 3.6.0 4.5.2 3.6.1 4.5.3 3.6.2 4.5.4 3.6.3 4.5.5 3.6.4 4.5.6 3.6.5 4.5.7 3.6.6 4.5.8 3.6.7 4.5.9 3.6.8 4.6.0 3.6.9 4.6.1 3.7.0 4.7.0 3.7.1 4.7.1 3.7.2 4.7.2 3.7.3 4.7.3 3.7.4 4.7.4 3.7.5 4.7.5 3.7.6 4.7.6 3.7.7 4.7.7 3.7.8 4.7.8 3.7.9 4.7.9 3.8.0 4.8.0 3.8.1 4.8.1 3.8.2 4.8.10 3.8.3 4.8.11 3.8.4 4.8.2 3.8.5 4.8.3 3.8.6 4.8.4 3.8.7 4.8.5 3.8.8 4.8.6 3.8.9 4.8.7 3.9.0 4.8.8 3.9.1 4.8.9 3.9.2 4.9.0 3.9.3 4.9.0-beta1 3.9.4 4.9.0-beta2 3.9.5 4.9.1 3.9.6 4.9.10 3.9.7 4.9.11 3.9.8 4.9.12 3.9.9 4.9.13 4.0.1 4.9.14 4.0.3 4.9.15 4.0.4 4.9.16 4.0.5 4.9.17 4.0.6 4.9.18 4.0.7 4.9.19 4.0.8 4.9.2 4.0.9 4.9.20 4.1.0 4.9.21 4.1.1 4.9.22 4.1.2 4.9.23 4.1.3 4.9.24 trunk 4.1.4 4.9.25 1.0 4.1.5 4.9.26 1.01 4.1.6 4.9.27 1.02 4.1.7 4.9.28 1.03 4.1.8 4.9.29 1.04 4.1.9 4.9.3 1.05 4.10.0 4.9.30 1.06 4.10.1 4.9.31 1.07 4.10.10 4.9.32 1.08 4.10.11 4.9.33 1.09 4.10.12 4.9.34 2.0 4.10.13 4.9.35 2.0.1 4.10.14 4.9.36 2.0.2 4.10.15 4.9.37 2.0.3 4.10.16 4.9.38 2.0.4 4.10.17 4.9.39 2.0.5 4.10.18 4.9.4 2.0.6 4.10.19 4.9.40 2.0.7 4.10.2 4.9.41 2.0.8 4.10.20 4.9.42 2.0.9 4.10.21 4.9.43 2.1.0 4.10.22 4.9.45 2.1.1 4.10.23 4.9.46 2.1.2 4.10.24 4.9.47 2.1.3 4.10.25 4.9.48 2.1.4 4.10.26 4.9.49 2.1.5 4.10.27 4.9.5 2.1.5-beta1 4.10.28 4.9.50 2.1.6 4.10.29 4.9.51 2.1.7 4.10.3 4.9.52 2.1.8 4.10.30 4.9.53 2.1.9 4.10.31 4.9.54 2.2.0 4.10.32 4.9.55 2.2.1 4.10.33 4.9.56 2.2.2 4.10.34 4.9.57 2.2.3 4.10.35 4.9.6 2.2.4 4.10.36 4.9.7 2.2.5 4.10.37 4.9.8 2.2.6 4.10.38 4.9.9 2.2.7 4.10.39 2.2.8 4.10.4 2.2.9 4.10.40 2.3.0 4.10.41 2.3.1 4.10.42 2.3.2 4.10.43 2.3.3 4.10.44 2.3.4 4.10.45 2.3.5 4.10.46 2.3.6 4.10.47 2.3.7 4.10.48 2.3.8 4.10.49 2.3.9 4.10.5 2.4.0 4.10.50 2.4.1 4.10.51 2.5.0 4.10.52 2.5.1 4.10.53 2.5.2 4.10.54 2.5.3 4.10.55 2.5.4 4.10.56 2.5.5 4.10.57 2.5.6 4.10.58 2.5.7 4.10.59 2.5.8 4.10.6 2.5.9 4.10.60 2.6.0 4.10.61 2.6.1 4.10.62 2.6.2 4.10.63 2.6.3 4.10.64 2.6.4 4.10.65 2.6.5 4.10.66 2.6.6 4.10.67 2.6.7 4.10.68 2.6.8 4.10.69 2.6.9 4.10.7 2.7.0 4.10.70 2.7.1 4.10.71 2.7.2 4.10.72 2.7.3 4.10.73 2.7.4 4.10.74 2.7.5 4.10.75 2.7.6 4.10.76 2.7.7 4.10.77 2.7.8 4.10.78 2.7.9 4.10.79 2.8.0 4.10.8 2.8.1 4.10.80 2.8.2 4.10.81 2.8.3 4.10.82 2.8.4 4.10.83 2.8.5 4.10.84 2.8.6 4.10.85 2.8.7 4.10.86 2.8.8 4.10.87 2.8.9 4.10.88 2.9.0 4.10.89 2.9.1 4.10.9 2.9.2 4.10.90 2.9.3 4.11.0 2.9.4 4.11.1 2.9.5 4.11.10 2.9.6 4.11.11 2.9.7 4.11.12 2.9.8 4.11.13 2.9.9 4.11.14 3.0.0 4.11.15 3.0.1 4.11.16 3.0.2 4.11.17 3.0.3 4.11.18 3.0.4 4.11.19 3.0.5 4.11.2 3.0.6 4.11.20 3.0.7 4.11.21 3.0.8 4.11.22 3.0.9 4.11.23 3.1.0 4.11.24 3.1.1 4.11.25 3.1.2 4.11.26 3.1.3 4.11.27 3.1.4 4.11.28 3.1.5 4.11.29 3.1.6 4.11.3 3.1.7 4.11.30 3.1.8 4.11.31 3.1.9 4.11.32 3.10.0 4.11.33 3.10.1 4.11.34 3.10.2 4.11.35 3.10.3 4.11.36 3.10.4 4.11.37 3.10.5 4.11.38 3.10.6 4.11.39 3.10.7 4.11.4 3.10.8 4.11.40 3.10.9 4.11.41 3.11.0 4.11.42 3.11.1 4.11.43 3.11.2 4.11.44 3.11.3 4.11.45 3.11.4 4.11.46 3.11.5 4.11.47 3.11.6 4.11.48 3.11.7 4.11.49 3.11.8 4.11.5 3.11.9 4.11.50 3.12.0 4.11.51 3.12.1 4.11.52 3.12.2 4.11.53 3.12.3 4.11.54 3.2.0 4.11.55 3.2.1 4.11.56 3.2.2 4.11.57 3.2.3 4.11.58 3.2.4 4.11.59 3.2.5 4.11.6 3.2.6 4.11.60 3.2.7 4.11.61 3.2.8 4.11.62 3.2.9 4.11.63 3.20.0 4.11.64 3.20.1 4.11.65 3.20.2 4.11.66 3.20.3 4.11.67 3.20.4 4.11.68
premium-addons-for-elementor / addons / floating-effects.php
premium-addons-for-elementor / addons Last commit date
display-conditions.php 2 weeks ago equal-height.php 2 weeks ago floating-effects.php 2 weeks ago liquid-glass.php 2 weeks ago shape-divider.php 2 weeks ago shapes.php 2 weeks ago tooltips.php 2 days ago wrapper-link.php 2 weeks ago
floating-effects.php
1176 lines
1 <?php
2 /**
3 * Class: Floating_Effects
4 * Name: Floating Effects
5 * Slug: floating-effects
6 */
7
8 namespace PremiumAddons\Addons;
9
10 // PremiumAddons Classes.
11 use PremiumAddons\Admin\Includes\Admin_Helper;
12 use PremiumAddons\Includes\Helper_Functions;
13
14 // Elementor Classes.
15 use Elementor\Repeater;
16 use Elementor\Controls_Manager;
17 use Elementor\Core\Kits\Documents\Tabs\Global_Colors;
18
19 if ( ! defined( 'ABSPATH' ) ) {
20 exit;
21 }
22
23 /**
24 * Class Floating_Effects
25 *
26 * @since 4.11.58
27 * @access public
28 * @package PremiumAddons\Addons
29 */
30 class Floating_Effects {
31
32 /**
33 * Load Script
34 *
35 * @var bool|null
36 */
37 private static $load_script = null;
38
39 /**
40 * Class object
41 *
42 * @var self|null
43 */
44 private static $instance = null;
45
46 /**
47 * Class Constructor Function
48 */
49 public function __construct() {
50
51 // Enqueue the required JS file.
52 add_action( 'elementor/preview/enqueue_scripts', array( $this, 'enqueue_scripts' ) );
53
54 // Creates Premium Floating Effects tab at the end of advanced tab.
55 add_action( 'elementor/element/common/_section_style/after_section_end', array( $this, 'register_controls' ), 10 );
56
57 // Check if scripts should be loaded.
58 add_action( 'elementor/frontend/widget/before_render', array( $this, 'check_script_enqueue' ) );
59 }
60
61 /**
62 * Enqueue scripts.
63 *
64 * Registers required dependencies for the extension and enqueues them.
65 *
66 * @since 1.6.5
67 * @access public
68 */
69 public function enqueue_scripts() {
70
71 if ( ! wp_script_is( 'pa-anime', 'enqueued' ) ) {
72 wp_enqueue_script( 'pa-anime' );
73 }
74
75 if ( ! wp_script_is( 'pa-feffects', 'enqueued' ) ) {
76 wp_enqueue_script( 'pa-feffects' );
77 }
78 }
79
80
81 /**
82 * Register Floating Effects controls.
83 *
84 * @since 1.0.0
85 * @access public
86 * @param object $element for current element.
87 */
88 public function register_controls( $element ) {
89
90 $element->start_controls_section(
91 'section_premium_fe',
92 array(
93 'label' => sprintf( '<i class="pa-extension-icon pa-dash-icon"></i> %s', __( 'Floating Effects', 'premium-addons-for-elementor' ) ),
94 'tab' => Controls_Manager::TAB_ADVANCED,
95 )
96 );
97
98 $element->add_control(
99 'premium_fe_switcher',
100 array(
101 'label' => __( 'Enable Floating Effects', 'premium-addons-for-elementor' ),
102 'type' => Controls_Manager::SWITCHER,
103 'prefix_class' => 'premium-floating-effects-',
104 'render_type' => 'template',
105 )
106 );
107
108 $doc_link = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/docs/elementor-floating-effects-tutorial/', 'feffect-addon', 'wp-editor', 'get-support' );
109
110 $element->add_control(
111 'pa_floating_effects_notice',
112 array(
113 'type' => Controls_Manager::RAW_HTML,
114 'raw' => '<a href="' . esc_url( $doc_link ) . '" target="_blank">' . __( 'How to use Premium Floating Effects for Elementor »', 'premium-addons-for-elementor' ) . '</a>',
115 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
116 'condition' => array(
117 'premium_fe_switcher' => 'yes',
118 ),
119 )
120 );
121
122 $element->add_control(
123 'premium_fe_trigger',
124 array(
125 'label' => __( 'Play On', 'premium-addons-for-elementor' ),
126 'type' => Controls_Manager::SELECT,
127 'default' => 'load',
128 'options' => array(
129 'load' => __( 'Page Load', 'premium-addons-for-elementor' ),
130 'hover' => __( 'Hover', 'premium-addons-for-elementor' ),
131 ),
132 'condition' => array(
133 'premium_fe_switcher' => 'yes',
134 ),
135 'frontend_available' => true,
136 )
137 );
138
139 $element->add_control(
140 'premium_fe_target',
141 array(
142 'label' => __( 'Custom CSS Selector', 'premium-addons-for-elementor' ),
143 'type' => Controls_Manager::TEXT,
144 'description' => __( 'Set this option if you want to apply floating effects on specfic selector inside your widget. For example, .premium-dual-header-container', 'premium-addons-for-elementor' ),
145 'dynamic' => array( 'active' => true ),
146 'label_block' => true,
147 'render_type' => 'template',
148 'ai' => array(
149 'active' => false,
150 ),
151 'condition' => array(
152 'premium_fe_switcher' => 'yes',
153 ),
154 'frontend_available' => true,
155 )
156 );
157
158 $get_pro = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/pro', 'feffect-addon', 'wp-editor', 'get-pro' );
159
160 $papro_activated = Helper_Functions::check_papro_version();
161
162 if ( ! $papro_activated ) {
163 $element->add_control(
164 'floating_effects_notice',
165 array(
166 'type' => Controls_Manager::RAW_HTML,
167 'raw' => __( 'The options in Filters tab are available in Premium Addons Pro.', 'premium-addons-for-elementor' ) . '<a href="' . esc_url( $get_pro ) . '" target="_blank">' . __( 'Upgrade now!', 'premium-addons-for-elementor' ) . '</a>',
168 'content_classes' => 'papro-upgrade-notice',
169 'condition' => array(
170 'premium_fe_switcher' => 'yes',
171 ),
172 )
173 );
174 }
175
176 $element->start_controls_tabs( 'effects_tabs' );
177
178 $element->start_controls_tab(
179 'motion_effects_tab',
180 array(
181 'label' => __( 'Motion', 'premium-addons-for-elementor' ),
182 'condition' => array(
183 'premium_fe_switcher' => 'yes',
184 ),
185 )
186 );
187
188 /**--------Translate Effect Controls---------*/
189 $element->add_control(
190 'premium_fe_translate_switcher',
191 array(
192 'label' => __( 'Translate', 'premium-addons-for-elementor' ),
193 'type' => Controls_Manager::SWITCHER,
194 'condition' => array(
195 'premium_fe_switcher' => 'yes',
196 ),
197 'frontend_available' => true,
198 )
199 );
200
201 $element->add_control(
202 'premium_fe_Xtranslate',
203 array(
204 'label' => __( 'Translate X', 'premium-addons-for-elementor' ),
205 'type' => Controls_Manager::SLIDER,
206 'default' => array(
207 'sizes' => array(
208 'from' => 0,
209 'to' => 5,
210 ),
211 'unit' => 'px',
212 ),
213 'range' => array(
214 'px' => array(
215 'min' => -150,
216 'max' => 150,
217 'step' => 1,
218 ),
219 ),
220 'labels' => array(
221 __( 'From', 'premium-addons-for-elementor' ),
222 __( 'To', 'premium-addons-for-elementor' ),
223 ),
224 'scales' => 1,
225 'handles' => 'range',
226 'condition' => array(
227 'premium_fe_switcher' => 'yes',
228 'premium_fe_translate_switcher' => 'yes',
229 ),
230 'frontend_available' => true,
231 )
232 );
233
234 $element->add_control(
235 'premium_fe_Ytranslate',
236 array(
237 'label' => __( 'Translate Y', 'premium-addons-for-elementor' ),
238 'type' => Controls_Manager::SLIDER,
239 'default' => array(
240 'sizes' => array(
241 'from' => 0,
242 'to' => 5,
243 ),
244 'unit' => 'px',
245 ),
246 'range' => array(
247 'px' => array(
248 'min' => -150,
249 'max' => 150,
250 'step' => 1,
251 ),
252 ),
253 'labels' => array(
254 __( 'From', 'premium-addons-for-elementor' ),
255 __( 'To', 'premium-addons-for-elementor' ),
256 ),
257 'scales' => 1,
258 'handles' => 'range',
259 'condition' => array(
260 'premium_fe_switcher' => 'yes',
261 'premium_fe_translate_switcher' => 'yes',
262 ),
263 'frontend_available' => true,
264 )
265 );
266
267 $element->add_control(
268 'premium_fe_trans_duration',
269 array(
270 'label' => __( 'Duration', 'premium-addons-for-elementor' ) . ' (ms)',
271 'type' => Controls_Manager::SLIDER,
272 'range' => array(
273 'px' => array(
274 'min' => 0,
275 'max' => 10000,
276 'step' => 100,
277 ),
278 ),
279 'default' => array(
280 'unit' => 'px',
281 'size' => 1000,
282 ),
283 'condition' => array(
284 'premium_fe_switcher' => 'yes',
285 'premium_fe_translate_switcher' => 'yes',
286 ),
287 'frontend_available' => true,
288 )
289 );
290
291 $element->add_control(
292 'premium_fe_trans_delay',
293 array(
294 'label' => __( 'Delay', 'premium-addons-for-elementor' ) . ' (ms)',
295 'type' => Controls_Manager::SLIDER,
296 'range' => array(
297 'px' => array(
298 'min' => 0,
299 'max' => 10000,
300 'step' => 100,
301 ),
302 ),
303 'condition' => array(
304 'premium_fe_switcher' => 'yes',
305 'premium_fe_translate_switcher' => 'yes',
306 ),
307 'frontend_available' => true,
308 )
309 );
310
311 /**--------Rotate Effect Controls---------*/
312 $element->add_control(
313 'premium_fe_rotate_switcher',
314 array(
315 'label' => __( 'Rotate', 'premium-addons-for-elementor' ),
316 'type' => Controls_Manager::SWITCHER,
317 'condition' => array(
318 'premium_fe_switcher' => 'yes',
319 ),
320 'frontend_available' => true,
321 )
322 );
323
324 $element->add_control(
325 'premium_fe_Xrotate',
326 array(
327 'label' => __( 'Rotate X', 'premium-addons-for-elementor' ),
328 'type' => Controls_Manager::SLIDER,
329 'default' => array(
330 'sizes' => array(
331 'from' => 0,
332 'to' => 45,
333 ),
334 'unit' => 'deg',
335 ),
336 'range' => array(
337 'deg' => array(
338 'min' => -180,
339 'max' => 180,
340 ),
341 ),
342 'labels' => array(
343 __( 'From', 'premium-addons-for-elementor' ),
344 __( 'To', 'premium-addons-for-elementor' ),
345 ),
346 'scales' => 1,
347 'handles' => 'range',
348 'condition' => array(
349 'premium_fe_switcher' => 'yes',
350 'premium_fe_rotate_switcher' => 'yes',
351 ),
352 'frontend_available' => true,
353 )
354 );
355
356 $element->add_control(
357 'premium_fe_Yrotate',
358 array(
359 'label' => __( 'Rotate Y', 'premium-addons-for-elementor' ),
360 'type' => Controls_Manager::SLIDER,
361 'default' => array(
362 'sizes' => array(
363 'from' => 0,
364 'to' => 45,
365 ),
366 'unit' => 'deg',
367 ),
368 'range' => array(
369 'deg' => array(
370 'min' => -180,
371 'max' => 180,
372 ),
373 ),
374 'labels' => array(
375 __( 'From', 'premium-addons-for-elementor' ),
376 __( 'To', 'premium-addons-for-elementor' ),
377 ),
378 'scales' => 1,
379 'handles' => 'range',
380 'condition' => array(
381 'premium_fe_switcher' => 'yes',
382 'premium_fe_rotate_switcher' => 'yes',
383 ),
384 'frontend_available' => true,
385 )
386 );
387
388 $element->add_control(
389 'premium_fe_Zrotate',
390 array(
391 'label' => __( 'Rotate Z', 'premium-addons-for-elementor' ),
392 'type' => Controls_Manager::SLIDER,
393 'default' => array(
394 'sizes' => array(
395 'from' => 0,
396 'to' => 45,
397 ),
398 'unit' => 'deg',
399 ),
400 'range' => array(
401 'deg' => array(
402 'min' => -180,
403 'max' => 180,
404 ),
405 ),
406 'labels' => array(
407 __( 'From', 'premium-addons-for-elementor' ),
408 __( 'To', 'premium-addons-for-elementor' ),
409 ),
410 'scales' => 1,
411 'handles' => 'range',
412 'condition' => array(
413 'premium_fe_switcher' => 'yes',
414 'premium_fe_rotate_switcher' => 'yes',
415 ),
416 'frontend_available' => true,
417 )
418 );
419
420 $element->add_control(
421 'premium_fe_rotate_duration',
422 array(
423 'label' => __( 'Duration', 'premium-addons-for-elementor' ) . ' (ms)',
424 'type' => Controls_Manager::SLIDER,
425 'range' => array(
426 'px' => array(
427 'min' => 0,
428 'max' => 10000,
429 'step' => 100,
430 ),
431 ),
432 'default' => array(
433 'unit' => 'px',
434 'size' => 1000,
435 ),
436 'condition' => array(
437 'premium_fe_switcher' => 'yes',
438 'premium_fe_rotate_switcher' => 'yes',
439 ),
440 'frontend_available' => true,
441 )
442 );
443
444 $element->add_control(
445 'premium_fe_rotate_delay',
446 array(
447 'label' => __( 'Delay', 'premium-addons-for-elementor' ) . ' (ms)',
448 'type' => Controls_Manager::SLIDER,
449 'range' => array(
450 'px' => array(
451 'min' => 0,
452 'max' => 10000,
453 'step' => 100,
454 ),
455 ),
456 'condition' => array(
457 'premium_fe_switcher' => 'yes',
458 'premium_fe_rotate_switcher' => 'yes',
459 ),
460 'frontend_available' => true,
461 )
462 );
463
464 /**--------Scale Effect Controls---------*/
465 $element->add_control(
466 'premium_fe_scale_switcher',
467 array(
468 'label' => __( 'Scale', 'premium-addons-for-elementor' ),
469 'type' => Controls_Manager::SWITCHER,
470 'condition' => array(
471 'premium_fe_switcher' => 'yes',
472 ),
473 'frontend_available' => true,
474 )
475 );
476
477 $element->add_control(
478 'premium_fe_Xscale',
479 array(
480 'label' => __( 'Scale X', 'premium-addons-for-elementor' ),
481 'type' => Controls_Manager::SLIDER,
482 'default' => array(
483 'sizes' => array(
484 'from' => 1,
485 'to' => 1.2,
486 ),
487 'unit' => 'px',
488 ),
489 'range' => array(
490 'px' => array(
491 'min' => 0,
492 'max' => 2,
493 'step' => 0.1,
494 ),
495 ),
496 'labels' => array(
497 __( 'From', 'premium-addons-for-elementor' ),
498 __( 'To', 'premium-addons-for-elementor' ),
499 ),
500 'scales' => 1,
501 'handles' => 'range',
502 'condition' => array(
503 'premium_fe_switcher' => 'yes',
504 'premium_fe_scale_switcher' => 'yes',
505 ),
506 'frontend_available' => true,
507 )
508 );
509
510 $element->add_control(
511 'premium_fe_Yscale',
512 array(
513 'label' => __( 'Scale Y', 'premium-addons-for-elementor' ),
514 'type' => Controls_Manager::SLIDER,
515 'default' => array(
516 'sizes' => array(
517 'from' => 1,
518 'to' => 1.2,
519 ),
520 'unit' => 'px',
521 ),
522 'range' => array(
523 'px' => array(
524 'min' => 0,
525 'max' => 2,
526 'step' => 0.1,
527 ),
528 ),
529 'labels' => array(
530 __( 'From', 'premium-addons-for-elementor' ),
531 __( 'To', 'premium-addons-for-elementor' ),
532 ),
533 'scales' => 1,
534 'handles' => 'range',
535 'condition' => array(
536 'premium_fe_switcher' => 'yes',
537 'premium_fe_scale_switcher' => 'yes',
538 ),
539 'frontend_available' => true,
540 )
541 );
542
543 $element->add_control(
544 'premium_fe_scale_duration',
545 array(
546 'label' => __( 'Duration', 'premium-addons-for-elementor' ) . ' (ms)',
547 'type' => Controls_Manager::SLIDER,
548 'range' => array(
549 'px' => array(
550 'min' => 0,
551 'max' => 10000,
552 'step' => 100,
553 ),
554 ),
555 'default' => array(
556 'unit' => 'px',
557 'size' => 1000,
558 ),
559 'condition' => array(
560 'premium_fe_switcher' => 'yes',
561 'premium_fe_scale_switcher' => 'yes',
562 ),
563 'frontend_available' => true,
564 )
565 );
566
567 $element->add_control(
568 'premium_fe_scale_delay',
569 array(
570 'label' => __( 'Delay', 'premium-addons-for-elementor' ) . ' (ms)',
571 'type' => Controls_Manager::SLIDER,
572 'range' => array(
573 'px' => array(
574 'min' => 0,
575 'max' => 10000,
576 'step' => 100,
577 ),
578 ),
579 'condition' => array(
580 'premium_fe_switcher' => 'yes',
581 'premium_fe_scale_switcher' => 'yes',
582 ),
583 'frontend_available' => true,
584 )
585 );
586
587 /**--------Skew Effect Controls---------*/
588 $element->add_control(
589 'premium_fe_skew_switcher',
590 array(
591 'label' => __( 'Skew', 'premium-addons-for-elementor' ),
592 'type' => Controls_Manager::SWITCHER,
593 'condition' => array(
594 'premium_fe_switcher' => 'yes',
595 ),
596 'frontend_available' => true,
597 )
598 );
599
600 $element->add_control(
601 'premium_fe_Xskew',
602 array(
603 'label' => __( 'Skew X', 'premium-addons-for-elementor' ),
604 'type' => Controls_Manager::SLIDER,
605 'default' => array(
606 'sizes' => array(
607 'from' => 0,
608 'to' => 20,
609 ),
610 'unit' => 'deg',
611 ),
612 'range' => array(
613 'deg' => array(
614 'min' => -180,
615 'max' => 180,
616 ),
617 ),
618 'labels' => array(
619 __( 'From', 'premium-addons-for-elementor' ),
620 __( 'To', 'premium-addons-for-elementor' ),
621 ),
622 'scales' => 1,
623 'handles' => 'range',
624 'condition' => array(
625 'premium_fe_switcher' => 'yes',
626 'premium_fe_skew_switcher' => 'yes',
627 ),
628 'frontend_available' => true,
629 )
630 );
631
632 $element->add_control(
633 'premium_fe_Yskew',
634 array(
635 'label' => __( 'Skew Y', 'premium-addons-for-elementor' ),
636 'type' => Controls_Manager::SLIDER,
637 'default' => array(
638 'sizes' => array(
639 'from' => 0,
640 'to' => 20,
641 ),
642 'unit' => 'deg',
643 ),
644 'range' => array(
645 'deg' => array(
646 'min' => -180,
647 'max' => 180,
648 ),
649 ),
650 'labels' => array(
651 __( 'From', 'premium-addons-for-elementor' ),
652 __( 'To', 'premium-addons-for-elementor' ),
653 ),
654 'scales' => 1,
655 'handles' => 'range',
656 'condition' => array(
657 'premium_fe_switcher' => 'yes',
658 'premium_fe_skew_switcher' => 'yes',
659 ),
660 'frontend_available' => true,
661 )
662 );
663
664 $element->add_control(
665 'premium_fe_skew_duration',
666 array(
667 'label' => __( 'Duration', 'premium-addons-for-elementor' ) . ' (ms)',
668 'type' => Controls_Manager::SLIDER,
669 'range' => array(
670 'px' => array(
671 'min' => 0,
672 'max' => 10000,
673 'step' => 100,
674 ),
675 ),
676 'default' => array(
677 'unit' => 'px',
678 'size' => 1000,
679 ),
680 'condition' => array(
681 'premium_fe_switcher' => 'yes',
682 'premium_fe_skew_switcher' => 'yes',
683 ),
684 'frontend_available' => true,
685 )
686 );
687
688 $element->add_control(
689 'premium_fe_skew_delay',
690 array(
691 'label' => __( 'Delay', 'premium-addons-for-elementor' ) . ' (ms)',
692 'type' => Controls_Manager::SLIDER,
693 'range' => array(
694 'px' => array(
695 'min' => 0,
696 'max' => 10000,
697 'step' => 100,
698 ),
699 ),
700 'condition' => array(
701 'premium_fe_switcher' => 'yes',
702 'premium_fe_skew_switcher' => 'yes',
703 ),
704 'frontend_available' => true,
705 )
706 );
707
708 $element->end_controls_tab();
709
710 $element->start_controls_tab(
711 'css_effects_tab',
712 array(
713 'label' => __( 'Style', 'premium-addons-for-elementor' ),
714 'condition' => array(
715 'premium_fe_switcher' => 'yes',
716 ),
717 )
718 );
719
720 /**--------CSS Properties Effect Controls---------*/
721
722 /**--------Opacity Effect Controls---------*/
723 $element->add_control(
724 'premium_fe_opacity_switcher',
725 array(
726 'label' => __( 'Opacity', 'premium-addons-for-elementor' ),
727 'type' => Controls_Manager::SWITCHER,
728 'condition' => array(
729 'premium_fe_switcher' => 'yes',
730 ),
731 'render_type' => 'template',
732 'selectors' => array(
733 '{{WRAPPER}}' => 'opacity: 0',
734 ),
735 'frontend_available' => true,
736 )
737 );
738
739 $element->add_control(
740 'premium_fe_opacity',
741 array(
742 'label' => __( 'Value', 'premium-addons-for-elementor' ),
743 'type' => Controls_Manager::SLIDER,
744 'frontend_available' => true,
745 'default' => array(
746 'sizes' => array(
747 'from' => 0,
748 'to' => 50,
749 ),
750 'unit' => '%',
751 ),
752 'labels' => array(
753 __( 'From', 'premium-addons-for-elementor' ),
754 __( 'To', 'premium-addons-for-elementor' ),
755 ),
756 'scales' => 1,
757 'handles' => 'range',
758 'condition' => array(
759 'premium_fe_switcher' => 'yes',
760 'premium_fe_opacity_switcher' => 'yes',
761 ),
762 )
763 );
764
765 $element->add_control(
766 'premium_fe_opacity_duration',
767 array(
768 'label' => __( 'Duration', 'premium-addons-for-elementor' ) . ' (ms)',
769 'type' => Controls_Manager::SLIDER,
770 'frontend_available' => true,
771 'range' => array(
772 'px' => array(
773 'min' => 0,
774 'max' => 10000,
775 'step' => 100,
776 ),
777 ),
778 'default' => array(
779 'unit' => 'px',
780 'size' => 1000,
781 ),
782 'condition' => array(
783 'premium_fe_switcher' => 'yes',
784 'premium_fe_opacity_switcher' => 'yes',
785 ),
786 )
787 );
788
789 $element->add_control(
790 'premium_fe_opacity_delay',
791 array(
792 'label' => __( 'Delay', 'premium-addons-for-elementor' ) . ' (ms)',
793 'type' => Controls_Manager::SLIDER,
794 'frontend_available' => true,
795 'range' => array(
796 'px' => array(
797 'min' => 0,
798 'max' => 10000,
799 'step' => 100,
800 ),
801 ),
802 'condition' => array(
803 'premium_fe_switcher' => 'yes',
804 'premium_fe_opacity_switcher' => 'yes',
805 ),
806
807 )
808 );
809
810 /**--------Background Color Effect Controls---------*/
811 $element->add_control(
812 'premium_fe_bg_color_switcher',
813 array(
814 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
815 'type' => Controls_Manager::SWITCHER,
816 'separator' => 'before',
817 'condition' => array(
818 'premium_fe_switcher' => 'yes',
819 ),
820 'frontend_available' => true,
821 )
822 );
823
824 $element->add_control(
825 'premium_fe_bg_color_from',
826 array(
827 'label' => __( 'From', 'premium-addons-for-elementor' ),
828 'type' => Controls_Manager::COLOR,
829 'frontend_available' => true,
830 'global' => array(
831 'default' => Global_Colors::COLOR_PRIMARY,
832 ),
833 'condition' => array(
834 'premium_fe_switcher' => 'yes',
835 'premium_fe_bg_color_switcher' => 'yes',
836 ),
837 )
838 );
839
840 $element->add_control(
841 'premium_fe_bg_color_to',
842 array(
843 'label' => __( 'To', 'premium-addons-for-elementor' ),
844 'type' => Controls_Manager::COLOR,
845 'frontend_available' => true,
846 'global' => array(
847 'default' => Global_Colors::COLOR_PRIMARY,
848 ),
849 'condition' => array(
850 'premium_fe_switcher' => 'yes',
851 'premium_fe_bg_color_switcher' => 'yes',
852 ),
853 )
854 );
855
856 $element->add_control(
857 'premium_fe_bg_color_duration',
858 array(
859 'label' => __( 'Duration', 'premium-addons-for-elementor' ) . ' (ms)',
860 'type' => Controls_Manager::SLIDER,
861 'frontend_available' => true,
862 'range' => array(
863 'px' => array(
864 'min' => 0,
865 'max' => 10000,
866 'step' => 100,
867 ),
868 ),
869 'default' => array(
870 'unit' => 'px',
871 'size' => 1000,
872 ),
873 'condition' => array(
874 'premium_fe_switcher' => 'yes',
875 'premium_fe_bg_color_switcher' => 'yes',
876 ),
877 )
878 );
879
880 $element->add_control(
881 'premium_fe_bg_color_delay',
882 array(
883 'label' => __( 'Delay', 'premium-addons-for-elementor' ) . ' (ms)',
884 'type' => Controls_Manager::SLIDER,
885 'frontend_available' => true,
886 'range' => array(
887 'px' => array(
888 'min' => 0,
889 'max' => 10000,
890 'step' => 100,
891 ),
892 ),
893 'condition' => array(
894 'premium_fe_switcher' => 'yes',
895 'premium_fe_bg_color_switcher' => 'yes',
896 ),
897
898 )
899 );
900
901 $element->end_controls_tab();
902
903 $element->start_controls_tab(
904 'filters_effects_tab',
905 array(
906 'label' => __( 'Filters', 'premium-addons-for-elementor' ),
907 'condition' => array(
908 'premium_fe_switcher' => 'yes',
909 ),
910 )
911 );
912
913 /**-------- CSS Filter Blur Controls---------*/
914 $element->add_control(
915 'premium_fe_blur_switcher',
916 array(
917 'label' => __( 'Blur', 'premium-addons-for-elementor' ),
918 'type' => Controls_Manager::SWITCHER,
919 'separator' => 'before',
920 'condition' => array(
921 'premium_fe_switcher' => 'yes',
922 ),
923 'frontend_available' => true,
924 )
925 );
926
927 do_action( 'pa_floating_blur_controls', $element );
928
929 /**-------- CSS Filter Contrast Controls---------*/
930 $element->add_control(
931 'premium_fe_contrast_switcher',
932 array(
933 'label' => __( 'Contrast', 'premium-addons-for-elementor' ),
934 'type' => Controls_Manager::SWITCHER,
935 'separator' => 'before',
936 'condition' => array(
937 'premium_fe_switcher' => 'yes',
938 ),
939 'frontend_available' => true,
940 )
941 );
942
943 do_action( 'pa_floating_contrast_controls', $element );
944
945 /**-------- CSS Filter grayscale Controls---------*/
946 $element->add_control(
947 'premium_fe_gScale_switcher',
948 array(
949 'label' => __( 'Grayscale', 'premium-addons-for-elementor' ),
950 'type' => Controls_Manager::SWITCHER,
951 'separator' => 'before',
952 'condition' => array(
953 'premium_fe_switcher' => 'yes',
954 ),
955 'frontend_available' => true,
956 )
957 );
958
959 do_action( 'pa_floating_gs_controls', $element );
960
961 /**-------- CSS Filter Hue Controls---------*/
962 $element->add_control(
963 'premium_fe_hue_switcher',
964 array(
965 'label' => __( 'Hue', 'premium-addons-for-elementor' ),
966 'type' => Controls_Manager::SWITCHER,
967 'separator' => 'before',
968 'condition' => array(
969 'premium_fe_switcher' => 'yes',
970 ),
971 'frontend_available' => true,
972 )
973 );
974
975 do_action( 'pa_floating_hue_controls', $element );
976
977 /**-------- CSS Filter Brightness Controls---------*/
978 $element->add_control(
979 'premium_fe_brightness_switcher',
980 array(
981 'label' => __( 'Brightness', 'premium-addons-for-elementor' ),
982 'type' => Controls_Manager::SWITCHER,
983 'separator' => 'before',
984 'condition' => array(
985 'premium_fe_switcher' => 'yes',
986 ),
987 'frontend_available' => true,
988 )
989 );
990
991 do_action( 'pa_floating_brightness_controls', $element );
992
993 /**-------- CSS Filter Saturation Controls---------*/
994 $element->add_control(
995 'premium_fe_saturate_switcher',
996 array(
997 'label' => __( 'Saturation ', 'premium-addons-for-elementor' ),
998 'type' => Controls_Manager::SWITCHER,
999 'separator' => 'before',
1000 'condition' => array(
1001 'premium_fe_switcher' => 'yes',
1002 ),
1003 'frontend_available' => true,
1004 )
1005 );
1006
1007 do_action( 'pa_floating_saturation_controls', $element );
1008
1009 $element->end_controls_tab();
1010
1011 $element->end_controls_tabs();
1012
1013 /**-------- General Settings Controls---------*/
1014 $element->add_control(
1015 'premium_fe_general_settings_heading',
1016 array(
1017 'label' => __( 'General Settings', 'premium-addons-for-elementor' ),
1018 'type' => Controls_Manager::HEADING,
1019 'separator' => 'before',
1020 'condition' => array(
1021 'premium_fe_switcher' => 'yes',
1022 ),
1023 )
1024 );
1025
1026 $element->add_control(
1027 'premium_fe_direction',
1028 array(
1029 'label' => __( 'Direction', 'premium-addons-for-elementor' ),
1030 'type' => Controls_Manager::SELECT,
1031 'default' => 'alternate',
1032 'options' => array(
1033 'normal' => __( 'Normal', 'premium-addons-for-elementor' ),
1034 'reverse' => __( 'Reverse', 'premium-addons-for-elementor' ),
1035 'alternate' => __( 'Alternate', 'premium-addons-for-elementor' ),
1036 ),
1037 'condition' => array(
1038 'premium_fe_switcher' => 'yes',
1039 ),
1040 'frontend_available' => true,
1041 )
1042 );
1043
1044 $element->add_control(
1045 'premium_fe_loop',
1046 array(
1047 'label' => __( 'Loop', 'premium-addons-for-elementor' ),
1048 'type' => Controls_Manager::SELECT,
1049 'default' => 'default',
1050 'options' => array(
1051 'default' => __( 'Infinite', 'premium-addons-for-elementor' ),
1052 'number' => __( 'Custom', 'premium-addons-for-elementor' ),
1053 ),
1054 'condition' => array(
1055 'premium_fe_switcher' => 'yes',
1056 ),
1057 'frontend_available' => true,
1058 )
1059 );
1060
1061 $element->add_control(
1062 'premium_fe_loop_number',
1063 array(
1064 'label' => __( 'Number', 'premium-addons-for-elementor' ),
1065 'type' => Controls_Manager::NUMBER,
1066 'default' => 3,
1067 'condition' => array(
1068 'premium_fe_switcher' => 'yes',
1069 'premium_fe_loop' => 'number',
1070 ),
1071 'frontend_available' => true,
1072 )
1073 );
1074
1075 $element->add_control(
1076 'premium_fe_easing',
1077 array(
1078 'label' => __( 'Easing', 'premium-addons-for-elementor' ),
1079 'type' => Controls_Manager::SELECT,
1080 'default' => 'easeInOutSine',
1081 'options' => array(
1082 'linear' => __( 'Linear', 'premium-addons-for-elementor' ),
1083 'easeInOutSine' => __( 'easeInOutSine', 'premium-addons-for-elementor' ),
1084 'easeInOutExpo' => __( 'easeInOutExpo', 'premium-addons-for-elementor' ),
1085 'easeInOutQuart' => __( 'easeInOutQuart', 'premium-addons-for-elementor' ),
1086 'easeInOutCirc' => __( 'easeInOutCirc', 'premium-addons-for-elementor' ),
1087 'easeInOutBack' => __( 'easeInOutBack', 'premium-addons-for-elementor' ),
1088 'steps' => __( 'Steps', 'premium-addons-for-elementor' ),
1089 'easeInElastic(1, .6)' => __( 'Elastic In', 'premium-addons-for-elementor' ),
1090 'easeOutElastic(1, .6)' => __( 'Elastic Out', 'premium-addons-for-elementor' ),
1091 'easeInOutElastic(1, .6)' => __( 'Elastic In Out', 'premium-addons-for-elementor' ),
1092 ),
1093 'condition' => array(
1094 'premium_fe_switcher' => 'yes',
1095 ),
1096 'frontend_available' => true,
1097
1098 )
1099 );
1100
1101 $element->add_control(
1102 'premium_fe_ease_step',
1103 array(
1104 'label' => __( 'Steps', 'premium-addons-for-elementor' ),
1105 'type' => Controls_Manager::NUMBER,
1106 'default' => 5,
1107 'condition' => array(
1108 'premium_fe_switcher' => 'yes',
1109 'premium_fe_easing' => 'steps',
1110 ),
1111 'frontend_available' => true,
1112 )
1113 );
1114
1115 $element->add_control(
1116 'premium_fe_disable_safari',
1117 array(
1118 'label' => __( 'Disable Floating Effects On Safari', 'premium-addons-for-elementor' ),
1119 'type' => Controls_Manager::SWITCHER,
1120 'prefix_class' => 'premium-disable-fe-',
1121 'separator' => 'before',
1122 'condition' => array(
1123 'premium_fe_switcher' => 'yes',
1124 ),
1125 )
1126 );
1127
1128 $element->end_controls_section();
1129 }
1130
1131
1132 /**
1133 * Check Script Enqueue
1134 *
1135 * Check if the script files should be loaded.
1136 *
1137 * @since 4.7.4
1138 * @access public
1139 *
1140 * @param object $element for current element.
1141 */
1142 public function check_script_enqueue( $element ) {
1143
1144 if ( self::$load_script ) {
1145 return;
1146 }
1147
1148 if ( 'yes' === $element->get_settings_for_display( 'premium_fe_switcher' ) ) {
1149 $this->enqueue_scripts();
1150
1151 self::$load_script = true;
1152
1153 remove_action( 'elementor/frontend/widget/before_render', array( $this, 'check_script_enqueue' ) );
1154 }
1155 }
1156
1157 /**
1158 * Creates and returns an instance of the class
1159 *
1160 * @since 4.2.5
1161 * @access public
1162 *
1163 * @return object
1164 */
1165 public static function get_instance() {
1166
1167 if ( ! isset( self::$instance ) ) {
1168
1169 self::$instance = new self();
1170
1171 }
1172
1173 return self::$instance;
1174 }
1175 }
1176