Premium Addons for Elementor - Version 3.10.3

Version Description

  • Tweak: Two effects added in Fancy Text widget.
  • Tweak: Improved Vimeo videos methods in Video Box widget.
Download this release

Release Info

Developer leap13
Plugin Icon 128x128 Premium Addons for Elementor
Version 3.10.3
Comparing to
See all releases

Code changes from version 3.10.2 to 3.10.3

assets/frontend/css/premium-addons.css CHANGED
@@ -2418,6 +2418,216 @@ ul.premium-person-social-list {
2418
  .premium-fancy-text-wrapper .premium-fancy-text-span-align {
2419
  vertical-align: top;
2420
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2421
  /**************** Premium Pricing Table ****************/
2422
  /*******************************************************/
2423
  /*Pricing Table Container Div Style*/
2418
  .premium-fancy-text-wrapper .premium-fancy-text-span-align {
2419
  vertical-align: top;
2420
  }
2421
+ .premium-fancy-text-wrapper:not(.typing):not(.slide) .premium-fancy-text-items-wrapper {
2422
+ margin: 0;
2423
+ padding: 0;
2424
+ border: none;
2425
+ position: relative;
2426
+ }
2427
+ .premium-fancy-text-wrapper:not(.typing):not(.slide) .premium-fancy-list-items {
2428
+ position: absolute;
2429
+ top: 0;
2430
+ left: 0;
2431
+ display: inline-block;
2432
+ }
2433
+ .premium-fancy-text-wrapper.zoomout .premium-fancy-item-hidden {
2434
+ opacity: 0;
2435
+ -webkit-animation: pa-zoom-out .8s;
2436
+ animation: pa-zoom-out .8s;
2437
+ }
2438
+ .premium-fancy-text-wrapper.zoomout .premium-fancy-item-visible {
2439
+ position: relative !important;
2440
+ -webkit-animation: pa-zoom-in .8s;
2441
+ animation: pa-zoom-in .8s;
2442
+ }
2443
+ .premium-fancy-text-wrapper.zoomout .premium-fancy-text-items-wrapper {
2444
+ -webkit-perspective: 300px;
2445
+ perspective: 300px;
2446
+ }
2447
+ .premium-fancy-text-wrapper.rotate .premium-fancy-list-items {
2448
+ -webkit-transform-origin: 50% 100%;
2449
+ -ms-transform-origin: 50% 100%;
2450
+ transform-origin: 50% 100%;
2451
+ }
2452
+ .premium-fancy-text-wrapper.rotate .premium-fancy-item-hidden {
2453
+ opacity: 0;
2454
+ -webkit-transform: rotateX(180deg);
2455
+ -moz-transform: rotateX(180deg);
2456
+ -ms-transform: rotateX(180deg);
2457
+ transform: rotateX(180deg);
2458
+ -webkit-animation: pa-rotate-out 1.2s;
2459
+ animation: pa-rotate-out 1.2s;
2460
+ }
2461
+ .premium-fancy-text-wrapper.rotate .premium-fancy-item-visible {
2462
+ position: relative !important;
2463
+ -webkit-transform: rotateX(0deg);
2464
+ -moz-transform: rotateX(0deg);
2465
+ -ms-transform: rotateX(0deg);
2466
+ transform: rotateX(0deg);
2467
+ -webkit-animation: pa-rotate-in 1.2s;
2468
+ animation: pa-rotate-in 1.2s;
2469
+ }
2470
+ .premium-fancy-text-wrapper.bar .premium-fancy-text-items-wrapper::after {
2471
+ position: absolute;
2472
+ content: '';
2473
+ left: 0;
2474
+ bottom: 0;
2475
+ width: 0;
2476
+ height: 3px;
2477
+ background: #000;
2478
+ }
2479
+ .premium-fancy-text-wrapper.bar .premium-fancy-text-items-wrapper.active::after {
2480
+ width: 100%;
2481
+ -webkit-transition: width 3s ease-in-out;
2482
+ -moz-transition: width 3s ease-in-out;
2483
+ -ms-transition: width 3s ease-in-out;
2484
+ transition: width 3s ease-in-out;
2485
+ }
2486
+ .premium-fancy-text-wrapper.bar .premium-fancy-list-items {
2487
+ opacity: 0;
2488
+ }
2489
+ .premium-fancy-text-wrapper.bar .premium-fancy-item-visible {
2490
+ opacity: 1;
2491
+ -webkit-transition: opacity 2s ease-in-out;
2492
+ -moz-transition: opacity 2s ease-in-out;
2493
+ -ms-transition: opacity 2s ease-in-out;
2494
+ transition: opacity 2s ease-in-out;
2495
+ position: relative !important;
2496
+ }
2497
+ @-webkit-keyframes pa-zoom-in {
2498
+ 0% {
2499
+ opacity: 0;
2500
+ -webkit-transform: translateZ(100px);
2501
+ transform: translateZ(100px);
2502
+ }
2503
+ 100% {
2504
+ opacity: 1;
2505
+ -webkit-transform: translateZ(0);
2506
+ transform: translateZ(0);
2507
+ }
2508
+ }
2509
+
2510
+ @keyframes pa-zoom-in {
2511
+ 0% {
2512
+ opacity: 0;
2513
+ -webkit-transform: translateZ(100px);
2514
+ transform: translateZ(100px);
2515
+ }
2516
+ 100% {
2517
+ opacity: 1;
2518
+ -webkit-transform: translateZ(0);
2519
+ transform: translateZ(0);
2520
+ }
2521
+ }
2522
+
2523
+ @-webkit-keyframes pa-zoom-out {
2524
+ 0% {
2525
+ opacity: 1;
2526
+ -webkit-transform: translateZ(0);
2527
+ transform: translateZ(0);
2528
+ }
2529
+ 100% {
2530
+ opacity: 0;
2531
+ -webkit-transform: translateZ(-100px);
2532
+ transform: translateZ(-100px);
2533
+ }
2534
+ }
2535
+
2536
+ @keyframes pa-zoom-out {
2537
+ 0% {
2538
+ opacity: 1;
2539
+ -webkit-transform: translateZ(0);
2540
+ transform: translateZ(0);
2541
+ }
2542
+ 100% {
2543
+ opacity: 0;
2544
+ -webkit-transform: translateZ(-100px);
2545
+ transform: translateZ(-100px);
2546
+ }
2547
+ }
2548
+ @-webkit-keyframes pa-rotate-in {
2549
+ 0% {
2550
+ opacity: 0;
2551
+ -webkit-transform: rotateX(180deg);
2552
+ transform: rotateX(180deg);
2553
+ }
2554
+ 35% {
2555
+ opacity: 0;
2556
+ -webkit-transform: rotateX(120deg);
2557
+ transform: rotateX(120deg);
2558
+ }
2559
+ 65% {
2560
+ opacity: 0;
2561
+ }
2562
+ 100% {
2563
+ opacity: 1;
2564
+ -webkit-transform: rotateX(360deg);
2565
+ transform: rotateX(360deg);
2566
+ }
2567
+ }
2568
+
2569
+ @keyframes pa-rotate-in {
2570
+ 0% {
2571
+ opacity: 0;
2572
+ -webkit-transform: rotateX(180deg);
2573
+ transform: rotateX(180deg);
2574
+ }
2575
+ 35% {
2576
+ opacity: 0;
2577
+ -webkit-transform: rotateX(120deg);
2578
+ transform: rotateX(120deg);
2579
+ }
2580
+ 65% {
2581
+ opacity: 0;
2582
+ }
2583
+ 100% {
2584
+ opacity: 1;
2585
+ -webkit-transform: rotateX(360deg);
2586
+ transform: rotateX(360deg);
2587
+ }
2588
+ }
2589
+
2590
+ @-webkit-keyframes pa-rotate-out {
2591
+ 0% {
2592
+ opacity: 1;
2593
+ -webkit-transform: rotateX(0deg);
2594
+ transform: rotateX(0deg);
2595
+ }
2596
+ 35% {
2597
+ opacity: 1;
2598
+ -webkit-transform: rotateX(-40deg);
2599
+ transform: rotateX(-40deg);
2600
+ }
2601
+ 65% {
2602
+ opacity: 0;
2603
+ }
2604
+ 100% {
2605
+ opacity: 0;
2606
+ -webkit-transform: rotateX(180deg);
2607
+ transform: rotateX(180deg);
2608
+ }
2609
+ }
2610
+
2611
+ @keyframes pa-rotate-out {
2612
+ 0% {
2613
+ opacity: 1;
2614
+ -webkit-transform: rotateX(0deg);
2615
+ transform: rotateX(0deg);
2616
+ }
2617
+ 35% {
2618
+ opacity: 1;
2619
+ -webkit-transform: rotateX(-40deg);
2620
+ transform: rotateX(-40deg);
2621
+ }
2622
+ 65% {
2623
+ opacity: 0;
2624
+ }
2625
+ 100% {
2626
+ opacity: 0;
2627
+ -webkit-transform: rotateX(180deg);
2628
+ transform: rotateX(180deg);
2629
+ }
2630
+ }
2631
  /**************** Premium Pricing Table ****************/
2632
  /*******************************************************/
2633
  /*Pricing Table Container Div Style*/
assets/frontend/js/premium-addons.js CHANGED
@@ -304,8 +304,8 @@
304
 
305
  /****** Premium Fancy Text Handler ******/
306
  var PremiumFancyTextHandler = function($scope, $) {
307
- var fancyTextElement = $scope.find(".premium-fancy-text-wrapper");
308
- var fancyTextSettings = fancyTextElement.data("settings");
309
  function escapeHtml(unsafe) {
310
  return unsafe
311
  .replace(/&/g, "&")
@@ -314,29 +314,73 @@
314
  .replace(/"/g, """)
315
  .replace(/'/g, "'");
316
  }
317
- if (fancyTextSettings["effect"] === "typing") {
318
  var fancyStrings = [];
319
- fancyTextSettings["strings"].forEach(function(item) {
320
  fancyStrings.push(escapeHtml(item));
321
  });
322
- fancyTextElement.find(".premium-fancy-text").typed({
323
  strings: fancyStrings,
324
- typeSpeed: fancyTextSettings["typeSpeed"],
325
- backSpeed: fancyTextSettings["backSpeed"],
326
- startDelay: fancyTextSettings["startDelay"],
327
- backDelay: fancyTextSettings["backDelay"],
328
- showCursor: fancyTextSettings["showCursor"],
329
- cursorChar: fancyTextSettings["cursorChar"],
330
- loop: fancyTextSettings["loop"]
331
  });
332
- } else {
333
- fancyTextElement.find(".premium-fancy-text").vTicker({
334
- speed: fancyTextSettings["speed"],
335
- showItems: fancyTextSettings["showItems"],
336
- pause: fancyTextSettings["pause"],
337
- mousePause: fancyTextSettings["mousePause"],
338
  direction: "up"
339
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
340
  }
341
  };
342
 
304
 
305
  /****** Premium Fancy Text Handler ******/
306
  var PremiumFancyTextHandler = function($scope, $) {
307
+ var $elem = $scope.find(".premium-fancy-text-wrapper");
308
+ var settings = $elem.data("settings");
309
  function escapeHtml(unsafe) {
310
  return unsafe
311
  .replace(/&/g, "&")
314
  .replace(/"/g, """)
315
  .replace(/'/g, "'");
316
  }
317
+ if ( settings["effect"] === "typing" ) {
318
  var fancyStrings = [];
319
+ settings["strings"].forEach(function(item) {
320
  fancyStrings.push(escapeHtml(item));
321
  });
322
+ $elem.find(".premium-fancy-text").typed({
323
  strings: fancyStrings,
324
+ typeSpeed: settings["typeSpeed"],
325
+ backSpeed: settings["backSpeed"],
326
+ startDelay: settings["startDelay"],
327
+ backDelay: settings["backDelay"],
328
+ showCursor: settings["showCursor"],
329
+ cursorChar: settings["cursorChar"],
330
+ loop: settings["loop"]
331
  });
332
+ } else if ( settings["effect"] === "slide" ) {
333
+ $elem.find(".premium-fancy-text").vTicker({
334
+ speed: settings["speed"],
335
+ showItems: settings["showItems"],
336
+ pause: settings["pause"],
337
+ mousePause: settings["mousePause"],
338
  direction: "up"
339
  });
340
+ } else {
341
+
342
+ setFancyAnimation();
343
+
344
+ function setFancyAnimation() {
345
+
346
+ var effect = settings.effect,
347
+ $item = $elem.find(".premium-fancy-list-items"),
348
+ current = 0;
349
+
350
+ var delay = ( settings.delay || 2.5 ) * 1000;
351
+
352
+ if( "bar" === effect )
353
+ $elem.find( ".premium-fancy-text-items-wrapper" ).addClass("active");
354
+
355
+ setInterval( function() {
356
+
357
+ // $elem.find( ".premium-fancy-text-items-wrapper" ).css("width", $item.eq( current ).outerWidth() );
358
+
359
+ if( "bar" === effect )
360
+ $elem.find( ".premium-fancy-text-items-wrapper" ).addClass("active");
361
+
362
+ $item.eq( current ).addClass( "premium-fancy-item-visible" ).removeClass( "premium-fancy-item-hidden" );
363
+
364
+ var $inactiveItems = $item.filter(function (index) {
365
+ return index !== current;
366
+ });
367
+
368
+ $inactiveItems.addClass( "premium-fancy-item-hidden" ).removeClass( "premium-fancy-item-visible" );
369
+ current++;
370
+
371
+ if( $item.length === current )
372
+ current = 0;
373
+
374
+ if( "bar" === effect ) {
375
+ setTimeout( function() {
376
+ $elem.find( ".premium-fancy-text-items-wrapper" ).removeClass("active");
377
+ }, delay - 100 );
378
+ }
379
+
380
+ }, delay );
381
+
382
+ }
383
+
384
  }
385
  };
386
 
premium-addons-for-elementor.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Premium Addons for Elementor
4
  Description: Premium Addons Plugin Includes 22+ premium widgets for Elementor Page Builder.
5
  Plugin URI: https://premiumaddons.com
6
- Version: 3.10.2
7
  Author: Leap13
8
  Author URI: https://leap13.com/
9
  Text Domain: premium-addons-for-elementor
@@ -14,12 +14,12 @@ License: GNU General Public License v3.0
14
  if ( ! defined('ABSPATH') ) exit; // No access of directly access
15
 
16
  // Define Constants
17
- define('PREMIUM_ADDONS_VERSION', '3.10.2');
18
  define('PREMIUM_ADDONS_URL', plugins_url( '/', __FILE__ ) );
19
  define('PREMIUM_ADDONS_PATH', plugin_dir_path( __FILE__ ) );
20
  define('PREMIUM_ADDONS_FILE', __FILE__);
21
  define('PREMIUM_ADDONS_BASENAME', plugin_basename( PREMIUM_ADDONS_FILE ) );
22
- define('PREMIUM_ADDONS_STABLE_VERSION', '3.10.1');
23
 
24
  if( ! class_exists('Premium_Addons_Elementor') ) {
25
 
3
  Plugin Name: Premium Addons for Elementor
4
  Description: Premium Addons Plugin Includes 22+ premium widgets for Elementor Page Builder.
5
  Plugin URI: https://premiumaddons.com
6
+ Version: 3.10.3
7
  Author: Leap13
8
  Author URI: https://leap13.com/
9
  Text Domain: premium-addons-for-elementor
14
  if ( ! defined('ABSPATH') ) exit; // No access of directly access
15
 
16
  // Define Constants
17
+ define('PREMIUM_ADDONS_VERSION', '3.10.3');
18
  define('PREMIUM_ADDONS_URL', plugins_url( '/', __FILE__ ) );
19
  define('PREMIUM_ADDONS_PATH', plugin_dir_path( __FILE__ ) );
20
  define('PREMIUM_ADDONS_FILE', __FILE__);
21
  define('PREMIUM_ADDONS_BASENAME', plugin_basename( PREMIUM_ADDONS_FILE ) );
22
+ define('PREMIUM_ADDONS_STABLE_VERSION', '3.10.2');
23
 
24
  if( ! class_exists('Premium_Addons_Elementor') ) {
25
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate Link: https://premiumaddons.com/?utm_source=wp-repo&utm_medium=link&utm_c
5
  Requires at Least: 4.5
6
  Tested Up To: 5.3
7
  Requires PHP: 5.4
8
- Stable Tag: 3.10.2
9
  License: GPL v3.0
10
  License URI: https://opensource.org/licenses/GPL-3.0
11
 
@@ -175,6 +175,11 @@ Premium Addons for Elementor is 100% Ads Free, Ads can only be detected from You
175
 
176
  == Changelog ==
177
 
 
 
 
 
 
178
  = 3.10.2 =
179
 
180
  - Tweak: Widgets prefix on settings page and editor panel can now be translated.
5
  Requires at Least: 4.5
6
  Tested Up To: 5.3
7
  Requires PHP: 5.4
8
+ Stable Tag: 3.10.3
9
  License: GPL v3.0
10
  License URI: https://opensource.org/licenses/GPL-3.0
11
 
175
 
176
  == Changelog ==
177
 
178
+ = 3.10.3 =
179
+
180
+ - Tweak: Two effects added in Fancy Text widget.
181
+ - Tweak: Improved Vimeo videos methods in Video Box widget.
182
+
183
  = 3.10.2 =
184
 
185
  - Tweak: Widgets prefix on settings page and editor panel can now be translated.
widgets/premium-fancytext.php CHANGED
@@ -145,63 +145,87 @@ class Premium_Fancytext extends Widget_Base {
145
  $this->end_controls_section();
146
 
147
  $this->start_controls_section('premium_fancy_additional_settings',
148
- [
149
- 'label' => __('Additional Settings', 'premium-addons-for-elementor'),
150
- ]
151
- );
152
 
153
- /*Text Effect*/
154
  $this->add_control('premium_fancy_text_effect',
155
- [
156
- 'label' => __('Effect', 'premium-addons-for-elementor'),
157
- 'type' => Controls_Manager::SELECT,
158
- 'options' => [
159
- 'typing'=> __('Typing', 'premium-addons-for-elementor'),
160
- 'slide' => __('Slide Up', 'premium-addons-for-elementor')
161
- ],
162
- 'default' => 'typing',
163
- 'label_block' => true,
164
- ]
165
- );
166
-
167
- /*Type Speed*/
 
 
168
  $this->add_control('premium_fancy_text_type_speed',
169
- [
170
- 'label' => __('Type Speed', 'premium-addons-for-elementor'),
171
- 'type' => Controls_Manager::NUMBER,
172
- 'default' => 30,
173
- 'description' => __( 'Set typing effect speed in milliseconds.', 'premium-addons-for-elementor' ),
174
- 'condition' => [
175
- 'premium_fancy_text_effect' => 'typing',
176
- ],
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  ]
178
- );
 
179
 
180
- /*Back Speed*/
181
- $this->add_control('premium_fancy_text_back_speed',
182
- [
183
- 'label' => __('Back Speed', 'premium-addons-for-elementor'),
184
- 'type' => Controls_Manager::NUMBER,
185
- 'default' => 30,
186
- 'description' => __( 'Set a speed for backspace effect in milliseconds.', 'premium-addons-for-elementor' ),
187
- 'condition' => [
188
- 'premium_fancy_text_effect' => 'typing',
189
- ],
190
  ]
191
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
192
 
193
- /*Start Delay*/
194
  $this->add_control('premium_fancy_text_start_delay',
195
- [
196
- 'label' => __('Start Delay', 'premium-addons-for-elementor'),
197
- 'type' => Controls_Manager::NUMBER,
198
- 'default' => 30,
199
- 'description' => __( 'If you set it on 5000 milliseconds, the first word/string will appear after 5 seconds.', 'premium-addons-for-elementor' ),
200
- 'condition' => [
201
- 'premium_fancy_text_effect' => 'typing',
202
- ],
203
- ]
204
- );
205
 
206
  /*Back Delay*/
207
  $this->add_control('premium_fancy_text_back_delay',
@@ -492,26 +516,27 @@ class Premium_Fancytext extends Widget_Base {
492
 
493
  protected function render( ) {
494
 
495
- $settings = $this->get_settings_for_display();
496
 
497
- $cursor_text = addslashes( $settings['premium_fancy_text_cursor_text'] );
498
 
499
- if( $settings['premium_fancy_text_effect'] === 'slide' ) {
500
- $this->add_render_attribute( 'prefix', 'class', 'premium-fancy-text-span-align' );
501
- $this->add_render_attribute( 'suffix', 'class', 'premium-fancy-text-span-align' );
502
- }
503
-
504
- if( $settings['premium_fancy_text_effect'] === 'typing' ) {
505
  $show_cursor = ( ! empty( $settings['premium_fancy_text_show_cursor'] ) ) ? true : false;
 
 
 
506
  $loop = ! empty( $settings['premium_fancy_text_type_loop'] ) ? true : false;
 
507
  $strings = array();
 
508
  foreach ( $settings['premium_fancy_text_strings'] as $item ) {
509
  if ( ! empty( $item['premium_text_strings_text_field'] ) ) {
510
  array_push( $strings, str_replace('\'',''', $item['premium_text_strings_text_field'] ) );
511
  }
512
  }
513
  $fancytext_settings = [
514
- 'effect' => $settings['premium_fancy_text_effect'],
515
  'strings' => $strings,
516
  'typeSpeed' => $settings['premium_fancy_text_type_speed'],
517
  'backSpeed' => $settings['premium_fancy_text_back_speed'],
@@ -521,31 +546,55 @@ class Premium_Fancytext extends Widget_Base {
521
  'cursorChar'=> $cursor_text,
522
  'loop' => $loop,
523
  ];
524
- } else {
525
- $mause_pause = !empty( $settings['premium_slide_up_hover_pause'] ) ? true : false;
 
 
 
 
526
  $fancytext_settings = [
527
- 'effect' => $settings['premium_fancy_text_effect'],
528
  'speed' => $settings['premium_slide_up_speed'],
529
  'showItems' => $settings['premium_slide_up_shown_items'],
530
  'pause' => $settings['premium_slide_up_pause_time'],
531
  'mousePause' => $mause_pause
532
  ];
 
 
 
 
 
533
  }
534
 
 
 
 
 
535
  ?>
536
 
537
- <div class="premium-fancy-text-wrapper" data-settings='<?php echo wp_json_encode($fancytext_settings); ?>'>
538
- <span class="premium-prefix-text"><span <?php echo $this->get_render_attribute_string('prefix'); ?>><?php echo wp_kses( ( $settings['premium_fancy_prefix_text'] ), true ); ?></span></span>
539
 
540
- <?php if ( $settings['premium_fancy_text_effect'] === 'typing' ) : ?>
541
- <span class="premium-fancy-text" ></span>
542
  <?php else : ?>
543
- <div class="premium-fancy-text" style='display: inline-block; text-align: center;'>
544
- <ul>
545
- <?php foreach ( $settings['premium_fancy_text_strings'] as $item ) :
546
- if ( ! empty( $item['premium_text_strings_text_field'] ) ) :
547
- echo "<li class='premium-fancy-list-items' >" . esc_attr( $item['premium_text_strings_text_field'] ) . "</li>";
548
- endif;
 
 
 
 
 
 
 
 
 
 
 
549
  endforeach; ?>
550
  </ul>
551
  </div>
@@ -562,18 +611,14 @@ class Premium_Fancytext extends Widget_Base {
562
  view.addInlineEditingAttributes('prefix');
563
  view.addInlineEditingAttributes('suffix');
564
 
 
565
 
566
  var cursorText = settings.premium_fancy_text_cursor_text,
567
  cursorTextEscaped = cursorText.replace(/'/g, "\\'");
568
 
569
  var fancyTextSettings = {};
570
-
571
- if( 'slide' === settings.premium_fancy_text_effect ) {
572
- view.addRenderAttribute( 'prefix', 'class', 'premium-fancy-text-span-align' );
573
- view.addRenderAttribute( 'suffix', 'class', 'premium-fancy-text-span-align' );
574
- }
575
 
576
- if( 'typing' === settings.premium_fancy_text_effect ) {
577
 
578
  var showCursor = settings.premium_fancy_text_show_cursor ? true : false,
579
  loop = settings.premium_fancy_text_type_loop ? true : false,
@@ -587,10 +632,7 @@ class Premium_Fancytext extends Widget_Base {
587
  strings.push( fancyString );
588
  }
589
  });
590
-
591
-
592
-
593
- fancyTextSettings.effect = settings.premium_fancy_text_effect,
594
  fancyTextSettings.strings = strings,
595
  fancyTextSettings.typeSpeed = settings.premium_fancy_text_type_speed,
596
  fancyTextSettings.backSpeed = settings.premium_fancy_text_back_speed,
@@ -601,19 +643,25 @@ class Premium_Fancytext extends Widget_Base {
601
  fancyTextSettings.loop = loop;
602
 
603
 
604
- } else {
605
 
606
  var mausePause = settings.premium_slide_up_hover_pause ? true : false;
607
 
608
- fancyTextSettings.effect = settings.premium_fancy_text_effect,
609
  fancyTextSettings.speed = settings.premium_slide_up_speed,
610
  fancyTextSettings.showItems = settings.premium_slide_up_shown_items,
611
  fancyTextSettings.pause = settings.premium_slide_up_pause_time,
612
  fancyTextSettings.mousePause = mausePause
613
 
 
 
 
 
 
 
 
614
  }
615
 
616
- view.addRenderAttribute( 'container', 'class', 'premium-fancy-text-wrapper' );
617
  view.addRenderAttribute( 'container', 'data-settings', JSON.stringify( fancyTextSettings ) );
618
 
619
  #>
@@ -621,15 +669,23 @@ class Premium_Fancytext extends Widget_Base {
621
  <div {{{ view.getRenderAttributeString('container') }}}>
622
  <span class="premium-prefix-text"><span {{{ view.getRenderAttributeString('prefix') }}}>{{{ settings.premium_fancy_prefix_text }}}</span></span>
623
 
624
- <# if ( 'typing' === settings.premium_fancy_text_effect ) { #>
625
- <span class="premium-fancy-text" ></span>
626
  <# } else { #>
627
  <div class="premium-fancy-text" style=' display: inline-block; text-align: center;'>
628
- <ul>
629
- <# _.each ( settings.premium_fancy_text_strings, function ( item ) {
630
- if ( '' !== item.premium_text_strings_text_field ) #>
631
- <li class='premium-fancy-list-items'>{{{ item.premium_text_strings_text_field }}}</li>
632
- <# }); #>
 
 
 
 
 
 
 
 
633
  </ul>
634
  </div>
635
  <# } #>
145
  $this->end_controls_section();
146
 
147
  $this->start_controls_section('premium_fancy_additional_settings',
148
+ [
149
+ 'label' => __('Additional Settings', 'premium-addons-for-elementor'),
150
+ ]
151
+ );
152
 
 
153
  $this->add_control('premium_fancy_text_effect',
154
+ [
155
+ 'label' => __('Effect', 'premium-addons-for-elementor'),
156
+ 'type' => Controls_Manager::SELECT,
157
+ 'options' => [
158
+ 'typing' => __('Typing', 'premium-addons-for-elementor'),
159
+ 'slide' => __('Slide Up', 'premium-addons-for-elementor'),
160
+ 'zoomout'=> __('Zoom Out', 'premium-addons-for-elementor'),
161
+ 'rotate' => __('Rotate', 'premium-addons-for-elementor'),
162
+ // 'bar' => __('Bar', 'premium-addons-for-elementor'),
163
+ ],
164
+ 'default' => 'typing',
165
+ 'label_block' => true,
166
+ ]
167
+ );
168
+
169
  $this->add_control('premium_fancy_text_type_speed',
170
+ [
171
+ 'label' => __('Type Speed', 'premium-addons-for-elementor'),
172
+ 'type' => Controls_Manager::NUMBER,
173
+ 'default' => 30,
174
+ 'description' => __( 'Set typing effect speed in milliseconds.', 'premium-addons-for-elementor' ),
175
+ 'condition' => [
176
+ 'premium_fancy_text_effect' => 'typing',
177
+ ],
178
+ ]
179
+ );
180
+
181
+ $this->add_control('premium_fancy_text_zoom_speed',
182
+ [
183
+ 'label' => __('Animation Speed', 'premium-addons-for-elementor'),
184
+ 'type' => Controls_Manager::NUMBER,
185
+ 'description' => __('Set animation speed in seconds.', 'premium-addons-for-elementor'),
186
+ 'condition' => [
187
+ 'premium_fancy_text_effect' => [ 'zoomout', 'rotate' ],
188
+ ],
189
+ 'selectors' => [
190
+ '{{WRAPPER}} .premium-fancy-text-wrapper.zoomout .premium-fancy-list-items, .premium-fancy-text-wrapper.rotate .premium-fancy-list-items' => 'animation-duration: {{VALUE}}s'
191
  ]
192
+ ]
193
+ );
194
 
195
+ $this->add_control('premium_fancy_text_zoom_delay',
196
+ [
197
+ 'label' => __('Animation Delay', 'premium-addons-for-elementor'),
198
+ 'type' => Controls_Manager::NUMBER,
199
+ 'description' => __('Set animation speed in seconds.', 'premium-addons-for-elementor'),
200
+ 'condition' => [
201
+ 'premium_fancy_text_effect' => [ 'zoomout', 'rotate' ],
 
 
 
202
  ]
203
+ ]
204
+ );
205
+
206
+ $this->add_control('premium_fancy_text_back_speed',
207
+ [
208
+ 'label' => __('Back Speed', 'premium-addons-for-elementor'),
209
+ 'type' => Controls_Manager::NUMBER,
210
+ 'default' => 30,
211
+ 'description' => __( 'Set a speed for backspace effect in milliseconds.', 'premium-addons-for-elementor' ),
212
+ 'condition' => [
213
+ 'premium_fancy_text_effect' => 'typing',
214
+ ],
215
+ ]
216
+ );
217
 
 
218
  $this->add_control('premium_fancy_text_start_delay',
219
+ [
220
+ 'label' => __('Start Delay', 'premium-addons-for-elementor'),
221
+ 'type' => Controls_Manager::NUMBER,
222
+ 'default' => 30,
223
+ 'description' => __( 'If you set it on 5000 milliseconds, the first word/string will appear after 5 seconds.', 'premium-addons-for-elementor' ),
224
+ 'condition' => [
225
+ 'premium_fancy_text_effect' => 'typing',
226
+ ],
227
+ ]
228
+ );
229
 
230
  /*Back Delay*/
231
  $this->add_control('premium_fancy_text_back_delay',
516
 
517
  protected function render( ) {
518
 
519
+ $settings = $this->get_settings_for_display();
520
 
521
+ $effect = $settings['premium_fancy_text_effect'];
522
 
523
+ if( $effect === 'typing' ) {
524
+
 
 
 
 
525
  $show_cursor = ( ! empty( $settings['premium_fancy_text_show_cursor'] ) ) ? true : false;
526
+
527
+ $cursor_text = addslashes( $settings['premium_fancy_text_cursor_text'] );
528
+
529
  $loop = ! empty( $settings['premium_fancy_text_type_loop'] ) ? true : false;
530
+
531
  $strings = array();
532
+
533
  foreach ( $settings['premium_fancy_text_strings'] as $item ) {
534
  if ( ! empty( $item['premium_text_strings_text_field'] ) ) {
535
  array_push( $strings, str_replace('\'','&#39;', $item['premium_text_strings_text_field'] ) );
536
  }
537
  }
538
  $fancytext_settings = [
539
+ 'effect' => $effect,
540
  'strings' => $strings,
541
  'typeSpeed' => $settings['premium_fancy_text_type_speed'],
542
  'backSpeed' => $settings['premium_fancy_text_back_speed'],
546
  'cursorChar'=> $cursor_text,
547
  'loop' => $loop,
548
  ];
549
+ } elseif( $effect === 'slide' ) {
550
+
551
+ $this->add_render_attribute( 'prefix', 'class', 'premium-fancy-text-span-align' );
552
+ $this->add_render_attribute( 'suffix', 'class', 'premium-fancy-text-span-align' );
553
+
554
+ $mause_pause = ! empty( $settings['premium_slide_up_hover_pause'] ) ? true : false;
555
  $fancytext_settings = [
556
+ 'effect' => $effect,
557
  'speed' => $settings['premium_slide_up_speed'],
558
  'showItems' => $settings['premium_slide_up_shown_items'],
559
  'pause' => $settings['premium_slide_up_pause_time'],
560
  'mousePause' => $mause_pause
561
  ];
562
+ } else {
563
+ $fancytext_settings = [
564
+ 'effect' => $effect,
565
+ 'delay' => $settings['premium_fancy_text_zoom_delay']
566
+ ];
567
  }
568
 
569
+ $this->add_render_attribute('wrapper', 'class', [ 'premium-fancy-text-wrapper', $effect ] );
570
+
571
+ $this->add_render_attribute('wrapper', 'data-settings', wp_json_encode( $fancytext_settings ) );
572
+
573
  ?>
574
 
575
+ <div <?php echo $this->get_render_attribute_string('wrapper'); ?>>
576
+ <span class="premium-prefix-text"><span <?php echo $this->get_render_attribute_string('prefix'); ?>><?php echo wp_kses( ( $settings['premium_fancy_prefix_text'] ), true ); ?></span></span>
577
 
578
+ <?php if ( $effect === 'typing' ) : ?>
579
+ <span class="premium-fancy-text"></span>
580
  <?php else : ?>
581
+ <div class="premium-fancy-text" style='display: inline-block; text-align: center'>
582
+ <ul class="premium-fancy-text-items-wrapper">
583
+ <?php foreach ( $settings['premium_fancy_text_strings'] as $index => $item ) :
584
+ if ( ! empty( $item['premium_text_strings_text_field'] ) ) :
585
+ $this->add_render_attribute( 'text_' . $item['_id'], 'class', 'premium-fancy-list-items' );
586
+
587
+ if( ( 'typing' !== $effect && 'slide' !== $effect ) && 0 !== $index ) {
588
+ $this->add_render_attribute( 'text_' . $item['_id'], 'class', 'premium-fancy-item-hidden' );
589
+ } else {
590
+ $this->add_render_attribute( 'text_' . $item['_id'], 'class', 'premium-fancy-item-visible' );
591
+ }
592
+
593
+ ?>
594
+ <li <?php echo $this->get_render_attribute_string('text_' . $item['_id'] ) ?>>
595
+ <?php echo esc_html( $item['premium_text_strings_text_field'] ); ?>
596
+ </li>
597
+ <?php endif;
598
  endforeach; ?>
599
  </ul>
600
  </div>
611
  view.addInlineEditingAttributes('prefix');
612
  view.addInlineEditingAttributes('suffix');
613
 
614
+ var effect = settings.premium_fancy_text_effect
615
 
616
  var cursorText = settings.premium_fancy_text_cursor_text,
617
  cursorTextEscaped = cursorText.replace(/'/g, "\\'");
618
 
619
  var fancyTextSettings = {};
 
 
 
 
 
620
 
621
+ if( 'typing' === effect ) {
622
 
623
  var showCursor = settings.premium_fancy_text_show_cursor ? true : false,
624
  loop = settings.premium_fancy_text_type_loop ? true : false,
632
  strings.push( fancyString );
633
  }
634
  });
635
+
 
 
 
636
  fancyTextSettings.strings = strings,
637
  fancyTextSettings.typeSpeed = settings.premium_fancy_text_type_speed,
638
  fancyTextSettings.backSpeed = settings.premium_fancy_text_back_speed,
643
  fancyTextSettings.loop = loop;
644
 
645
 
646
+ } else if ( 'slide' === effect ) {
647
 
648
  var mausePause = settings.premium_slide_up_hover_pause ? true : false;
649
 
 
650
  fancyTextSettings.speed = settings.premium_slide_up_speed,
651
  fancyTextSettings.showItems = settings.premium_slide_up_shown_items,
652
  fancyTextSettings.pause = settings.premium_slide_up_pause_time,
653
  fancyTextSettings.mousePause = mausePause
654
 
655
+ } else {
656
+
657
+ view.addRenderAttribute( 'prefix', 'class', 'premium-fancy-text-span-align' );
658
+ view.addRenderAttribute( 'suffix', 'class', 'premium-fancy-text-span-align' );
659
+
660
+ fancyTextSettings.delay = settings.premium_fancy_text_zoom_delay;
661
+
662
  }
663
 
664
+ view.addRenderAttribute( 'container', 'class', [ 'premium-fancy-text-wrapper', effect ] );
665
  view.addRenderAttribute( 'container', 'data-settings', JSON.stringify( fancyTextSettings ) );
666
 
667
  #>
669
  <div {{{ view.getRenderAttributeString('container') }}}>
670
  <span class="premium-prefix-text"><span {{{ view.getRenderAttributeString('prefix') }}}>{{{ settings.premium_fancy_prefix_text }}}</span></span>
671
 
672
+ <# if ( 'typing' === effect ) { #>
673
+ <span class="premium-fancy-text"></span>
674
  <# } else { #>
675
  <div class="premium-fancy-text" style=' display: inline-block; text-align: center;'>
676
+ <ul class="premium-fancy-text-items-wrapper">
677
+ <# _.each ( settings.premium_fancy_text_strings, function ( item, index ) {
678
+ if ( '' !== item.premium_text_strings_text_field ) {
679
+ view.addRenderAttribute( 'text_' + item._id, 'class', 'premium-fancy-list-items' );
680
+
681
+ if( ( 'typing' !== effect && 'slide' !== effect ) && 0 !== index ) {
682
+ view.addRenderAttribute( 'text_' + item._id, 'class', 'premium-fancy-item-hidden' );
683
+ } else {
684
+ view.addRenderAttribute( 'text_' + item._id, 'class', 'premium-fancy-item-visible' );
685
+ } #>
686
+
687
+ <li {{{ view.getRenderAttributeString('text_' + item._id ) }}}>{{{ item.premium_text_strings_text_field }}}</li>
688
+ <# } }); #>
689
  </ul>
690
  </div>
691
  <# } #>
widgets/premium-videobox.php CHANGED
@@ -863,7 +863,14 @@ class Premium_Videobox extends Widget_Base {
863
  $link = Embed::get_embed_url( $link );
864
  $video_id = $video_props['video_id'];
865
  } elseif ( 'vimeo' === $type ) {
 
866
  $video_id = substr( $link, strpos( $link, '.com/' ) + 5 );
 
 
 
 
 
 
867
  $link = sprintf( 'https://player.vimeo.com/video/%s', $video_id );
868
  }
869
 
863
  $link = Embed::get_embed_url( $link );
864
  $video_id = $video_props['video_id'];
865
  } elseif ( 'vimeo' === $type ) {
866
+ $mask = '/^.*vimeo\.com\/(?:[a-z]*\/)*([‌​0-9]{6,11})[?]?.*/';
867
  $video_id = substr( $link, strpos( $link, '.com/' ) + 5 );
868
+ preg_match( $mask, $link, $matches );
869
+ if( $matches ) {
870
+ $video_id = $matches[1];
871
+ } else {
872
+ $video_id = substr( $link, strpos( $link, '.com/' ) + 5 );
873
+ }
874
  $link = sprintf( 'https://player.vimeo.com/video/%s', $video_id );
875
  }
876