Premium Addons for Elementor - Version 3.1.0

Version Description

  • Tweak: Added Carousel option for Blog widget.
  • Tweak: Added Next/Previous Page String for pagination buttons in Blog widget.
  • Tweak: Added Text Align option for pagination in Blog widget.
  • Tweak: Added Typography, Border, Border Radius, Margin and Padding style options for pagination buttons in Blog widget.
  • Fixed: Added Navigation Dots Position option in Carousel widget.
  • Fixed: Spacing below navigation dots in Carousel widget.
Download this release

Release Info

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

Code changes from version 3.0.9 to 3.1.0

admin/settings/version-control.php CHANGED
@@ -79,7 +79,7 @@ class PA_Version_Control {
79
  <tr class="pa-roll-row">
80
  <th>Rollback Version</th>
81
  <td>
82
- <div><?php echo sprintf( '<a target="_blank" href="%s" class="button pa-btn pa-rollback-button elementor-button-spinner">Reinstall Version 3.0.8</a>', wp_nonce_url( admin_url( 'admin-post.php?action=premium_addons_rollback' ), 'premium_addons_rollback' ) ); ?> </div>
83
  <p class="pa-roll-desc"><span>Warning: Please backup your database before making the rollback.</span></p>
84
  </td>
85
  </tr>
79
  <tr class="pa-roll-row">
80
  <th>Rollback Version</th>
81
  <td>
82
+ <div><?php echo sprintf( '<a target="_blank" href="%s" class="button pa-btn pa-rollback-button elementor-button-spinner">Reinstall Version 3.1.0</a>', wp_nonce_url( admin_url( 'admin-post.php?action=premium_addons_rollback' ), 'premium_addons_rollback' ) ); ?> </div>
83
  <p class="pa-roll-desc"><span>Warning: Please backup your database before making the rollback.</span></p>
84
  </td>
85
  </tr>
assets/css/premium-addons.css CHANGED
@@ -821,7 +821,9 @@
821
  .premium-carousel-wrapper a.carousel-arrow,
822
  .premium-carousel-wrapper a.ver-carousel-arrow,
823
  .premium-fb-rev-container a.carousel-arrow,
824
- .premium-fb-rev-container a.ver-carousel-arrow {
 
 
825
  display: flex;
826
  align-items: center;
827
  justify-content: center;
@@ -846,7 +848,8 @@
846
  box-shadow: none !important;
847
  }
848
  .premium-carousel-wrapper a.carousel-arrow,
849
- .premium-fb-rev-container a.carousel-arrow {
 
850
  top: 50%;
851
  }
852
  .premium-carousel-wrapper a.ver-carousel-arrow {
@@ -874,10 +877,24 @@ a.circle-border {
874
  a.square-border {
875
  border: solid black;
876
  }
877
- ul.slick-dots {
878
  list-style: none;
879
  text-align: center;
880
- margin-left: 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
881
  }
882
  ul.slick-dots li {
883
  font-size: 10px;
@@ -1966,29 +1983,30 @@ button.premium-modal-box-modal-close {
1966
  padding: 0;
1967
  }
1968
  .premium-blog-pagination-container li {
1969
- display: inline;
1970
- }
1971
- .premium-blog-pagination-container li a,
1972
- .premium-blog-pagination-container li span{
1973
- display: inline;
1974
  margin-right: 10px;
1975
  margin-bottom: 5px;
1976
  padding: 3px 7px;
1977
- border: 1px solid #E3E3E3;
1978
- font-size: 16px;
1979
- line-height: 20px;
1980
  -webkit-transition: all 0.3s ease-in-out;
1981
  -moz-transition: all 0.3s ease-in-out;
1982
  -ms-transition: all 0.3s ease-in-out;
1983
  -o-transition: all 0.3s ease-in-out;
1984
  transition: all 0.3s ease-in-out;
1985
  }
1986
- .premium-blog-pagination-container li .prev,
 
 
 
 
 
 
 
 
1987
  .premium-blog-pagination-container li .next {
1988
  border: none;
1989
  border-radius: 0;
1990
  font-size: 17.8px;
1991
- }
1992
  .premium-blog-wrap {
1993
  display: -ms-flexbox;
1994
  display: -webkit-flex;
821
  .premium-carousel-wrapper a.carousel-arrow,
822
  .premium-carousel-wrapper a.ver-carousel-arrow,
823
  .premium-fb-rev-container a.carousel-arrow,
824
+ .premium-fb-rev-container a.ver-carousel-arrow,
825
+ .premium-blog-wrap a.carousel-arrow,
826
+ .premium-blog-wrap a.ver-carousel-arrow {
827
  display: flex;
828
  align-items: center;
829
  justify-content: center;
848
  box-shadow: none !important;
849
  }
850
  .premium-carousel-wrapper a.carousel-arrow,
851
+ .premium-fb-rev-container a.carousel-arrow,
852
+ .premium-blog-wrap a.carousel-arrow {
853
  top: 50%;
854
  }
855
  .premium-carousel-wrapper a.ver-carousel-arrow {
877
  a.square-border {
878
  border: solid black;
879
  }
880
+ .premium-carousel-wrapper ul.slick-dots {
881
  list-style: none;
882
  text-align: center;
883
+ margin: 0;
884
+ padding: 0;
885
+ }
886
+ .premium-carousel-dots-above ul.slick-dots {
887
+ position: absolute;
888
+ display: -ms-flexbox;
889
+ display: -webkit-flex;
890
+ display: -moz-flex;
891
+ display: -ms-flex;
892
+ display: flex;
893
+ top: 50%;
894
+ -webkit-transform: translateY(-50%);
895
+ transform: translateY(-50%);
896
+ -webkit-flex-direction: column;
897
+ flex-direction: column;
898
  }
899
  ul.slick-dots li {
900
  font-size: 10px;
1983
  padding: 0;
1984
  }
1985
  .premium-blog-pagination-container li {
1986
+ display: inline-block;
 
 
 
 
1987
  margin-right: 10px;
1988
  margin-bottom: 5px;
1989
  padding: 3px 7px;
 
 
 
1990
  -webkit-transition: all 0.3s ease-in-out;
1991
  -moz-transition: all 0.3s ease-in-out;
1992
  -ms-transition: all 0.3s ease-in-out;
1993
  -o-transition: all 0.3s ease-in-out;
1994
  transition: all 0.3s ease-in-out;
1995
  }
1996
+ .premium-blog-pagination-container li span {
1997
+ cursor: default;
1998
+ }
1999
+ .premium-blog-pagination-container li a,
2000
+ .premium-blog-pagination-container li span {
2001
+ font-size: 16px;
2002
+ display: inline-block;
2003
+ }
2004
+ /*.premium-blog-pagination-container li .prev,
2005
  .premium-blog-pagination-container li .next {
2006
  border: none;
2007
  border-radius: 0;
2008
  font-size: 17.8px;
2009
+ }*/
2010
  .premium-blog-wrap {
2011
  display: -ms-flexbox;
2012
  display: -webkit-flex;
assets/js/premium-addons.js CHANGED
@@ -503,7 +503,17 @@
503
  /****** Premium Blog Handler ******/
504
  var PremiumBlogHandler = function($scope, $) {
505
  var blogElement = $scope.find(".premium-blog-wrap"),
506
- masonryBlog = blogElement.data("pa-masonry");
 
 
 
 
 
 
 
 
 
 
507
  if (masonryBlog) {
508
  blogElement.imagesLoaded(function() {
509
  blogElement.isotope({
@@ -517,6 +527,25 @@
517
  });
518
  });
519
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
520
  };
521
 
522
  //Elementor JS Hooks
@@ -569,4 +598,4 @@
569
  );
570
  }
571
  });
572
- })(jQuery);
503
  /****** Premium Blog Handler ******/
504
  var PremiumBlogHandler = function($scope, $) {
505
  var blogElement = $scope.find(".premium-blog-wrap"),
506
+ masonryBlog = blogElement.data("pa-masonry"),
507
+ colsNumber = blogElement.data("col"),
508
+ carousel = blogElement.data("carousel"),
509
+ autoPlay = blogElement.data("play"),
510
+ speed = blogElement.data("speed"),
511
+ fade = blogElement.data("fade"),
512
+ prevArrow =
513
+ '<a type="button" data-role="none" class="carousel-arrow carousel-prev" aria-label="Next" role="button" style=""><i class="fa fa-angle-left" aria-hidden="true"></i></a>',
514
+ nextArrow =
515
+ '<a type="button" data-role="none" class="carousel-arrow carousel-next" aria-label="Next" role="button" style=""><i class="fa fa-angle-right" aria-hidden="true"></i></a>';
516
+
517
  if (masonryBlog) {
518
  blogElement.imagesLoaded(function() {
519
  blogElement.isotope({
527
  });
528
  });
529
  }
530
+
531
+ if ( carousel && ! masonryBlog ) {
532
+ $(blogElement).slick({
533
+ infinite: true,
534
+ slidesToShow: colsNumber,
535
+ slidesToScroll: colsNumber,
536
+ responsive: [
537
+ { breakpoint: 769, settings: { slidesToShow: 1, slidesToScroll: 1 } },
538
+ { breakpoint: 481, settings: { slidesToShow: 1, slidesToScroll: 1 } }
539
+ ],
540
+ autoplay: autoPlay,
541
+ autoplaySpeed: speed,
542
+ nextArrow: nextArrow,
543
+ prevArrow: prevArrow,
544
+ fade: fade,
545
+ draggable: true
546
+ });
547
+ }
548
+
549
  };
550
 
551
  //Elementor JS Hooks
598
  );
599
  }
600
  });
601
+ })(jQuery);
premium-addons-for-elementor.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Premium Addons for Elementor
4
  Description: Premium Addons Plugin Includes 21+ premium widgets for Elementor Page Builder.
5
  Plugin URI: https://premiumaddons.com
6
- Version: 3.0.9
7
  Author: Leap13
8
  Author URI: http://leap13.com/
9
  Text Domain: premium-addons-for-elementor
@@ -23,12 +23,12 @@ if ( ! defined('ABSPATH') ) exit; // No access of directly access
23
 
24
 
25
  // Define Constants
26
- define('PREMIUM_ADDONS_VERSION', '3.0.9');
27
  define('PREMIUM_ADDONS_URL', plugins_url('/', __FILE__));
28
  define('PREMIUM_ADDONS_PATH', plugin_dir_path(__FILE__));
29
  define('PREMIUM_ADDONS_FILE', __FILE__);
30
  define('PREMIUM_ADDONS_BASENAME', plugin_basename(__FILE__));
31
- define('PREMIUM_ADDONS_STABLE_VERSION', '3.0.8');
32
 
33
  if( ! class_exists('Premium_Addons_Elementor') ) {
34
  /*
3
  Plugin Name: Premium Addons for Elementor
4
  Description: Premium Addons Plugin Includes 21+ premium widgets for Elementor Page Builder.
5
  Plugin URI: https://premiumaddons.com
6
+ Version: 3.1.0
7
  Author: Leap13
8
  Author URI: http://leap13.com/
9
  Text Domain: premium-addons-for-elementor
23
 
24
 
25
  // Define Constants
26
+ define('PREMIUM_ADDONS_VERSION', '3.1.0');
27
  define('PREMIUM_ADDONS_URL', plugins_url('/', __FILE__));
28
  define('PREMIUM_ADDONS_PATH', plugin_dir_path(__FILE__));
29
  define('PREMIUM_ADDONS_FILE', __FILE__);
30
  define('PREMIUM_ADDONS_BASENAME', plugin_basename(__FILE__));
31
+ define('PREMIUM_ADDONS_STABLE_VERSION', '3.0.9');
32
 
33
  if( ! class_exists('Premium_Addons_Elementor') ) {
34
  /*
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: http://premiumaddons.com
5
  Requires at least: 4.5
6
  Tested up to: 5.0.3
7
  Requires PHP: 5.4
8
- Stable tag: 3.0.9
9
  License: GPL v3.0
10
  License URI: https://opensource.org/licenses/GPL-3.0
11
 
@@ -138,6 +138,15 @@ Premium Addons for Elementor is 100% Ads Free, Ads can only be detected from You
138
 
139
  == Changelog ==
140
 
 
 
 
 
 
 
 
 
 
141
  = 3.0.9 =
142
 
143
  - Tweak: Added `Fade` and `Zoom` transition effects Premium Carousel widget.
5
  Requires at least: 4.5
6
  Tested up to: 5.0.3
7
  Requires PHP: 5.4
8
+ Stable tag: 3.1.0
9
  License: GPL v3.0
10
  License URI: https://opensource.org/licenses/GPL-3.0
11
 
138
 
139
  == Changelog ==
140
 
141
+ = 3.1.0 =
142
+
143
+ - Tweak: Added `Carousel` option for Blog widget.
144
+ - Tweak: Added `Next/Previous Page String` for pagination buttons in Blog widget.
145
+ - Tweak: Added `Text Align` option for pagination in Blog widget.
146
+ - Tweak: Added `Typography, Border, Border Radius, Margin and Padding` style options for pagination buttons in Blog widget.
147
+ - Fixed: Added `Navigation Dots Position` option in Carousel widget.
148
+ - Fixed: Spacing below navigation dots in Carousel widget.
149
+
150
  = 3.0.9 =
151
 
152
  - Tweak: Added `Fade` and `Zoom` transition effects Premium Carousel widget.
widgets/premium-blog.php CHANGED
@@ -21,6 +21,7 @@ class Premium_Blog extends Widget_Base {
21
  public function get_script_depends(){
22
  return [
23
  'isotope-js',
 
24
  'premium-addons-js'
25
  ];
26
  }
@@ -398,6 +399,56 @@ class Premium_Blog extends Widget_Base {
398
  'description' => __('Pagination is the process of dividing the posts into discrete pages','premium-addons-for-elementor'),
399
  ]
400
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
401
 
402
  $this->add_control('premium_blog_new_tab',
403
  [
@@ -428,6 +479,83 @@ class Premium_Blog extends Widget_Base {
428
  ]
429
  );
430
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
431
  $this->end_controls_section();
432
 
433
  $this->start_controls_section('premium_blog_image_style_section',
@@ -460,7 +588,7 @@ class Premium_Blog extends Widget_Base {
460
  'value' => Scheme_Color::COLOR_1,
461
  ],
462
  'selectors' => [
463
- '{{WRAPPER}} .premium-blog-framed-effect, {{WRAPPER}} .premium-blog-bordered-effect,{{WRAPPER}} .premium-blog-squares-effect:before,{{WRAPPER}} .premium-blog-squares-effect:after,{{WRAPPER}} .premium-blog-squares-square-container:before,{{WRAPPER}} .premium-blog-squares-square-container:after, {{WRAPPER}} .premium-blog-format-container:hover,{{WRAPPER}} .premium-blog-pagination-container .current' => 'background-color: {{VALUE}};',
464
  ]
465
  ]
466
  );
@@ -764,6 +892,15 @@ class Premium_Blog extends Widget_Base {
764
  ]
765
  );
766
 
 
 
 
 
 
 
 
 
 
767
  $this->start_controls_tabs('premium_blog_pagination_colors');
768
 
769
  $this->start_controls_tab('premium_blog_pagination_nomral',
@@ -782,7 +919,7 @@ class Premium_Blog extends Widget_Base {
782
  'value' => Scheme_Color::COLOR_2,
783
  ],
784
  'selectors' => [
785
- '{{WRAPPER}} .premium-blog-pagination-container li a, {{WRAPPER}} .premium-blog-pagination-container li span' => 'color: {{VALUE}};'
786
  ]
787
  ]
788
  );
@@ -796,7 +933,7 @@ class Premium_Blog extends Widget_Base {
796
  'value' => Scheme_Color::COLOR_1,
797
  ],
798
  'selectors' => [
799
- '{{WRAPPER}} .premium-blog-pagination-container li a, {{WRAPPER}} .premium-blog-pagination-container li span' => 'background-color: {{VALUE}};'
800
  ]
801
  ]
802
  );
@@ -819,7 +956,7 @@ class Premium_Blog extends Widget_Base {
819
  'value' => Scheme_Color::COLOR_1,
820
  ],
821
  'selectors' => [
822
- '{{WRAPPER}} .premium-blog-pagination-container li:hover a, {{WRAPPER}} .premium-blog-pagination-container li:hover span' => 'color: {{VALUE}};'
823
  ]
824
  ]
825
  );
@@ -833,7 +970,7 @@ class Premium_Blog extends Widget_Base {
833
  'value' => Scheme_Color::COLOR_2,
834
  ],
835
  'selectors' => [
836
- '{{WRAPPER}} .premium-blog-pagination-container li:hover a, {{WRAPPER}} .premium-blog-pagination-container li:hover span' => 'background-color: {{VALUE}};'
837
  ]
838
  ]
839
  );
@@ -842,6 +979,121 @@ class Premium_Blog extends Widget_Base {
842
 
843
  $this->end_controls_tabs();
844
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
845
  $this->end_controls_section();
846
 
847
  }
@@ -1005,10 +1257,28 @@ class Premium_Blog extends Widget_Base {
1005
  break;
1006
  }
1007
 
 
 
 
 
 
 
 
1008
  $this->add_render_attribute('blog', 'class', [ 'premium-blog-wrap', 'premium-blog-' . $col_number ] );
1009
 
1010
  $this->add_render_attribute('blog', 'data-pa-masonry', $settings['premium_blog_masonry'] );
1011
 
 
 
 
 
 
 
 
 
 
 
 
1012
  ?>
1013
 
1014
  <div <?php echo $this->get_render_attribute_string('blog'); ?>>
@@ -1037,8 +1307,8 @@ class Premium_Blog extends Widget_Base {
1037
  'current' => max( 1, $paged ),
1038
  'total' => $page_tot,
1039
  'prev_next' => true,
1040
- 'prev_text' => sprintf( "&lsaquo; %s", __("Previous","premium-addons-for-elementor") ),
1041
- 'next_text' => sprintf( "%s &rsaquo;", __("Next","premium-addons-for-elementor") ),
1042
  'end_size' => 1,
1043
  'mid_size' => 2,
1044
  'type' => 'list'
21
  public function get_script_depends(){
22
  return [
23
  'isotope-js',
24
+ 'jquery-slick',
25
  'premium-addons-js'
26
  ];
27
  }
399
  'description' => __('Pagination is the process of dividing the posts into discrete pages','premium-addons-for-elementor'),
400
  ]
401
  );
402
+
403
+ $this->add_control('premium_blog_next_text',
404
+ [
405
+ 'label' => __( 'Next Page String', 'premium-addons-for-elementor' ),
406
+ 'type' => Controls_Manager::TEXT,
407
+ 'default' => __('Next','premium-addons-for-elementor'),
408
+ 'condition' => [
409
+ 'premium_blog_paging' => 'yes',
410
+ ]
411
+ ]
412
+ );
413
+
414
+ $this->add_control('premium_blog_prev_text',
415
+ [
416
+ 'label' => __( 'Previous Page String', 'premium-addons-for-elementor' ),
417
+ 'type' => Controls_Manager::TEXT,
418
+ 'default' => __('Previous','premium-addons-for-elementor'),
419
+ 'condition' => [
420
+ 'premium_blog_paging' => 'yes',
421
+ ]
422
+ ]
423
+ );
424
+
425
+ $this->add_responsive_control('premium_blog_pagination_align',
426
+ [
427
+ 'label' => __( 'Alignment', 'premium-addons-for-elementor' ),
428
+ 'type' => Controls_Manager::CHOOSE,
429
+ 'options' => [
430
+ 'left' => [
431
+ 'title'=> __( 'Left', 'premium-addons-for-elementor' ),
432
+ 'icon' => 'fa fa-align-left',
433
+ ],
434
+ 'center' => [
435
+ 'title'=> __( 'Center', 'premium-addons-for-elementor' ),
436
+ 'icon' => 'fa fa-align-center',
437
+ ],
438
+ 'right' => [
439
+ 'title'=> __( 'Right', 'premium-addons-for-elementor' ),
440
+ 'icon' => 'fa fa-align-right',
441
+ ],
442
+ ],
443
+ 'default' => 'right',
444
+ 'condition' => [
445
+ 'premium_blog_paging' => 'yes',
446
+ ],
447
+ 'selectors' => [
448
+ '{{WRAPPER}} .premium-blog-pagination-container' => 'text-align: {{VALUE}};',
449
+ ],
450
+ ]
451
+ );
452
 
453
  $this->add_control('premium_blog_new_tab',
454
  [
479
  ]
480
  );
481
 
482
+ $this->end_controls_section();
483
+
484
+ $this->start_controls_section('premium_blog_carousel_settings',
485
+ [
486
+ 'label' => __('Carousel', 'premium-addons-for-elementor'),
487
+ 'condition' => [
488
+ 'premium_blog_masonry!' => 'true'
489
+ ]
490
+ ]
491
+ );
492
+
493
+ $this->add_control('premium_blog_carousel',
494
+ [
495
+ 'label' => __('Enable Carousel', 'premium-addons-for-elementor'),
496
+ 'type' => Controls_Manager::SWITCHER
497
+ ]
498
+ );
499
+
500
+ $this->add_control('premium_blog_carousel_fade',
501
+ [
502
+ 'label' => __('Fade', 'premium-addons-for-elementor'),
503
+ 'type' => Controls_Manager::SWITCHER,
504
+ 'condition' => [
505
+ 'premium_blog_columns_number' => '100%'
506
+ ]
507
+ ]
508
+ );
509
+
510
+ $this->add_control('premium_blog_carousel_play',
511
+ [
512
+ 'label' => __('Auto Play', 'premium-addons-for-elementor'),
513
+ 'type' => Controls_Manager::SWITCHER,
514
+ 'condition' => [
515
+ 'premium_blog_carousel' => 'yes'
516
+ ]
517
+ ]
518
+ );
519
+
520
+ $this->add_control('premium_blog_carousel_autoplay_speed',
521
+ [
522
+ 'label' => __( 'Autoplay Speed', 'premium-addons-for-elementor' ),
523
+ 'description' => __( 'Autoplay Speed means at which time the next slide should come. Set a value in milliseconds (ms)', 'premium-addons-for-elementor' ),
524
+ 'type' => Controls_Manager::NUMBER,
525
+ 'default' => 5000,
526
+ 'condition' => [
527
+ 'premium_blog_carousel' => 'yes',
528
+ 'premium_blog_carousel_play' => 'yes',
529
+ ],
530
+ ]
531
+ );
532
+
533
+ $this->add_responsive_control('premium_blog_carousel_arrows_pos',
534
+ [
535
+ 'label' => __('Arrows Position', 'premium-addons-for-elementor'),
536
+ 'type' => Controls_Manager::SLIDER,
537
+ 'size_units' => ['px', "em"],
538
+ 'range' => [
539
+ 'px' => [
540
+ 'min' => -100,
541
+ 'max' => 100,
542
+ ],
543
+ 'em' => [
544
+ 'min' => -10,
545
+ 'max' => 10,
546
+ ],
547
+ ],
548
+ 'condition' => [
549
+ 'premium_blog_carousel' => 'yes'
550
+ ],
551
+ 'selectors' => [
552
+ '{{WRAPPER}} .premium-blog-wrap a.carousel-arrow.carousel-next' => 'right: {{SIZE}}{{UNIT}};',
553
+ '{{WRAPPER}} .premium-blog-wrap a.carousel-arrow.carousel-prev' => 'left: {{SIZE}}{{UNIT}};',
554
+ ]
555
+ ]
556
+ );
557
+
558
+
559
  $this->end_controls_section();
560
 
561
  $this->start_controls_section('premium_blog_image_style_section',
588
  'value' => Scheme_Color::COLOR_1,
589
  ],
590
  'selectors' => [
591
+ '{{WRAPPER}} .premium-blog-framed-effect, {{WRAPPER}} .premium-blog-bordered-effect,{{WRAPPER}} .premium-blog-squares-effect:before,{{WRAPPER}} .premium-blog-squares-effect:after,{{WRAPPER}} .premium-blog-squares-square-container:before,{{WRAPPER}} .premium-blog-squares-square-container:after, {{WRAPPER}} .premium-blog-format-container:hover' => 'background-color: {{VALUE}};',
592
  ]
593
  ]
594
  );
892
  ]
893
  );
894
 
895
+ $this->add_group_control(
896
+ Group_Control_Typography::get_type(),
897
+ [
898
+ 'name' => 'premium_blog_pagination_typo',
899
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
900
+ 'selector' => '{{WRAPPER}} .premium-blog-pagination-container li *',
901
+ ]
902
+ );
903
+
904
  $this->start_controls_tabs('premium_blog_pagination_colors');
905
 
906
  $this->start_controls_tab('premium_blog_pagination_nomral',
919
  'value' => Scheme_Color::COLOR_2,
920
  ],
921
  'selectors' => [
922
+ '{{WRAPPER}} .premium-blog-pagination-container li *' => 'color: {{VALUE}};'
923
  ]
924
  ]
925
  );
933
  'value' => Scheme_Color::COLOR_1,
934
  ],
935
  'selectors' => [
936
+ '{{WRAPPER}} .premium-blog-pagination-container li' => 'background-color: {{VALUE}};'
937
  ]
938
  ]
939
  );
956
  'value' => Scheme_Color::COLOR_1,
957
  ],
958
  'selectors' => [
959
+ '{{WRAPPER}} .premium-blog-pagination-container li:hover *' => 'color: {{VALUE}};'
960
  ]
961
  ]
962
  );
970
  'value' => Scheme_Color::COLOR_2,
971
  ],
972
  'selectors' => [
973
+ '{{WRAPPER}} .premium-blog-pagination-container li:hover' => 'background-color: {{VALUE}};'
974
  ]
975
  ]
976
  );
979
 
980
  $this->end_controls_tabs();
981
 
982
+ $this->add_group_control(
983
+ Group_Control_Border::get_type(),
984
+ [
985
+ 'name' => 'premium_blog_border',
986
+ 'separator' => 'before',
987
+ 'selector' => '{{WRAPPER}} .premium-blog-pagination-container li',
988
+ ]
989
+ );
990
+
991
+ $this->add_control('premium_blog_border_radius',
992
+ [
993
+ 'label' => __('Border Radius', 'premium-addons-for-elementor'),
994
+ 'type' => Controls_Manager::SLIDER,
995
+ 'size_units' => ['px', '%' ,'em'],
996
+ 'selectors' => [
997
+ '{{WRAPPER}} .premium-blog-pagination-container li' => 'border-radius: {{SIZE}}{{UNIT}};'
998
+ ]
999
+ ]
1000
+ );
1001
+
1002
+ $this->add_responsive_control('prmeium_blog_pagination_margin',
1003
+ [
1004
+ 'label' => __('Margin', 'premium-addons-for-elementor'),
1005
+ 'type' => Controls_Manager::DIMENSIONS,
1006
+ 'size_units' => ['px', 'em', '%'],
1007
+ 'selectors' => [
1008
+ '{{WRAPPER}} .premium-blog-pagination-container li' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
1009
+ ]
1010
+ ]
1011
+ );
1012
+
1013
+ $this->add_responsive_control('prmeium_blog_pagination_padding',
1014
+ [
1015
+ 'label' => __('Padding', 'premium-addons-for-elementor'),
1016
+ 'type' => Controls_Manager::DIMENSIONS,
1017
+ 'size_units' => ['px', 'em', '%'],
1018
+ 'selectors' => [
1019
+ '{{WRAPPER}} .premium-blog-pagination-container li' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'
1020
+ ]
1021
+ ]
1022
+ );
1023
+
1024
+ $this->end_controls_section();
1025
+
1026
+ $this->start_controls_section('carousel_style',
1027
+ [
1028
+ 'label' => __('Carousel', 'premium-addons-for-elementor'),
1029
+ 'tab' => Controls_Manager::TAB_STYLE,
1030
+ 'condition' => [
1031
+ 'premium_blog_carousel' => 'yes'
1032
+ ]
1033
+ ]
1034
+ );
1035
+
1036
+ $this->add_control('arrow_color',
1037
+ [
1038
+ 'label' => __('Color', 'premium-addons-for-elementor'),
1039
+ 'type' => Controls_Manager::COLOR,
1040
+ 'scheme' => [
1041
+ 'type' => Scheme_Color::get_type(),
1042
+ 'value' => Scheme_Color::COLOR_1,
1043
+ ],
1044
+ 'selectors' => [
1045
+ '{{WRAPPER}} .premium-blog-wrap .slick-arrow' => 'color: {{VALUE}};',
1046
+ ]
1047
+ ]
1048
+ );
1049
+
1050
+ $this->add_responsive_control('premium_blog_carousel_arrow_size',
1051
+ [
1052
+ 'label' => __('Size', 'premium-addons-for-elementor'),
1053
+ 'type' => Controls_Manager::SLIDER,
1054
+ 'size_units' => ['px', '%' ,'em'],
1055
+ 'selectors' => [
1056
+ '{{WRAPPER}} .premium-blog-wrap .slick-arrow i' => 'font-size: {{SIZE}}{{UNIT}};'
1057
+ ]
1058
+ ]
1059
+ );
1060
+
1061
+ $this->add_control('premium_blog_carousel_arrow_background',
1062
+ [
1063
+ 'label' => __('Background Color', 'premium-addons-for-elementor'),
1064
+ 'type' => Controls_Manager::COLOR,
1065
+ 'scheme' => [
1066
+ 'type' => Scheme_Color::get_type(),
1067
+ 'value' => Scheme_Color::COLOR_2,
1068
+ ],
1069
+ 'selectors' => [
1070
+ '{{WRAPPER}} .premium-blog-wrap .slick-arrow' => 'background-color: {{VALUE}};',
1071
+ ]
1072
+ ]
1073
+ );
1074
+
1075
+ $this->add_control('premium_blog_carousel_border_radius',
1076
+ [
1077
+ 'label' => __('Border Radius', 'premium-addons-for-elementor'),
1078
+ 'type' => Controls_Manager::SLIDER,
1079
+ 'size_units' => ['px', '%' ,'em'],
1080
+ 'selectors' => [
1081
+ '{{WRAPPER}} .premium-blog-wrap .slick-arrow' => 'border-radius: {{SIZE}}{{UNIT}};'
1082
+ ]
1083
+ ]
1084
+ );
1085
+
1086
+ $this->add_control('premium_blog_carousel_arrow_padding',
1087
+ [
1088
+ 'label' => __('Padding', 'premium-addons-for-elementor'),
1089
+ 'type' => Controls_Manager::SLIDER,
1090
+ 'size_units' => ['px', '%' ,'em'],
1091
+ 'selectors' => [
1092
+ '{{WRAPPER}} .premium-blog-wrap .slick-arrow' => 'padding: {{SIZE}}{{UNIT}};'
1093
+ ]
1094
+ ]
1095
+ );
1096
+
1097
  $this->end_controls_section();
1098
 
1099
  }
1257
  break;
1258
  }
1259
 
1260
+ $posts_number = intval ( 100 / substr( $settings['premium_blog_columns_number'], 0, strpos( $settings['premium_blog_columns_number'], '%') ) );
1261
+
1262
+ $carousel = 'yes' == $settings['premium_blog_carousel'] ? true : false;
1263
+ $play = 'yes' == $settings['premium_blog_carousel_play'] ? true : false;
1264
+ $fade = 'yes' == $settings['premium_blog_carousel_fade'] ? 'true' : 'false';
1265
+ $speed = ! empty( $settings['premium_blog_carousel_autoplay_speed'] ) ? $settings['premium_blog_carousel_autoplay_speed'] : 5000;
1266
+
1267
  $this->add_render_attribute('blog', 'class', [ 'premium-blog-wrap', 'premium-blog-' . $col_number ] );
1268
 
1269
  $this->add_render_attribute('blog', 'data-pa-masonry', $settings['premium_blog_masonry'] );
1270
 
1271
+ $this->add_render_attribute('blog', 'data-carousel', $carousel );
1272
+
1273
+ $this->add_render_attribute('blog', 'data-fade', $fade );
1274
+
1275
+ $this->add_render_attribute('blog', 'data-play', $play );
1276
+
1277
+ $this->add_render_attribute('blog', 'data-speed', $speed );
1278
+
1279
+ $this->add_render_attribute('blog', 'data-col', $posts_number );
1280
+
1281
+
1282
  ?>
1283
 
1284
  <div <?php echo $this->get_render_attribute_string('blog'); ?>>
1307
  'current' => max( 1, $paged ),
1308
  'total' => $page_tot,
1309
  'prev_next' => true,
1310
+ 'prev_text' => sprintf( "&lsaquo; %s", $settings['premium_blog_prev_text'] ),
1311
+ 'next_text' => sprintf( "%s &rsaquo;", $settings['premium_blog_next_text'] ),
1312
  'end_size' => 1,
1313
  'mid_size' => 2,
1314
  'type' => 'list'
widgets/premium-carousel.php CHANGED
@@ -109,12 +109,82 @@ class Premium_Carousel extends Widget_Base {
109
  'default' => 'horizontal'
110
  ]
111
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
 
113
  $this->add_control('premium_carousel_slides_to_show',
114
  [
115
  'label' => __( 'Appearance', 'premium-addons-for-elementor' ),
116
  'type' => Controls_Manager::SELECT,
117
  'default' => 'all',
 
118
  'options' => [
119
  'all' => __( 'All visible', 'premium-addons-for-elementor' ),
120
  'single' => __( 'One at a time', 'premium-addons-for-elementor' )
@@ -168,6 +238,9 @@ class Premium_Carousel extends Widget_Base {
168
  'label' => __( 'Fade', 'premium-addons-for-elementor' ),
169
  'type' => Controls_Manager::SWITCHER,
170
  'description' => __( 'Enable fade transition between slides', 'premium-addons-for-elementor' ),
 
 
 
171
  ]
172
  );
173
 
@@ -176,7 +249,8 @@ class Premium_Carousel extends Widget_Base {
176
  'label' => __( 'Zoom Effect', 'premium-addons-for-elementor' ),
177
  'type' => Controls_Manager::SWITCHER,
178
  'condition' => [
179
- 'premium_carousel_fade' => 'yes'
 
180
  ]
181
  ]
182
  );
@@ -232,16 +306,10 @@ class Premium_Carousel extends Widget_Base {
232
  $this->start_controls_section('premium_carousel_navigation_arrows',
233
  [
234
  'label' => __( 'Navigation Arrows', 'premium-addons-for-elementor' ),
235
- 'tab' => Controls_Manager::TAB_STYLE
236
- ]
237
- );
238
-
239
- $this->add_control('premium_carousel_navigation_show',
240
- [
241
- 'label' => __( 'Arrows', 'premium-addons-for-elementor' ),
242
- 'description' => __( 'Enable or disable navigation arrows', 'premium-addons-for-elementor' ),
243
- 'type' => Controls_Manager::SWITCHER,
244
- 'default' => 'yes'
245
  ]
246
  );
247
 
@@ -505,16 +573,10 @@ class Premium_Carousel extends Widget_Base {
505
  $this->start_controls_section('premium_carousel_navigation_dots',
506
  [
507
  'label' => __( 'Navigation Dots', 'premium-addons-for-elementor' ),
508
- 'tab' => Controls_Manager::TAB_STYLE
509
- ]
510
- );
511
-
512
- $this->add_control('premium_carousel_dot_navigation_show',
513
- [
514
- 'label' => __( 'Dots', 'premium-addons-for-elementor' ),
515
- 'description' => __( 'Enable or disable navigation dots', 'premium-addons-for-elementor' ),
516
- 'type' => Controls_Manager::SWITCHER,
517
- 'default' => 'yes'
518
  ]
519
  );
520
 
@@ -938,9 +1000,14 @@ class Premium_Carousel extends Widget_Base {
938
  $extra_class,
939
  $dir
940
  ] );
 
 
 
 
 
941
 
942
  if( $settings['premium_carousel_fade'] == 'yes' && $settings['premium_carousel_zoom'] == 'yes' ) {
943
- $this->add_render_attribute( 'carousel', 'class', 'premium-carousel-scale' );
944
  }
945
 
946
  $this->add_render_attribute( 'carousel', 'data-settings', wp_json_encode( $carousel_settings ) );
109
  'default' => 'horizontal'
110
  ]
111
  );
112
+
113
+ $this->add_control('premium_carousel_dot_navigation_show',
114
+ [
115
+ 'label' => __( 'Dots', 'premium-addons-for-elementor' ),
116
+ 'description' => __( 'Enable or disable navigation dots', 'premium-addons-for-elementor' ),
117
+ 'type' => Controls_Manager::SWITCHER,
118
+ 'separator' => 'before',
119
+ 'default' => 'yes'
120
+ ]
121
+ );
122
+
123
+ $this->add_control('premium_carousel_dot_position',
124
+ [
125
+ 'label' => __( 'Position', 'premium-addons-for-elementor' ),
126
+ 'type' => Controls_Manager::SELECT,
127
+ 'default' => 'below',
128
+ 'options' => [
129
+ 'below' => __( 'Below Slides', 'premium-addons-for-elementor' ),
130
+ 'above' => __( 'On Slides', 'premium-addons-for-elementor' )
131
+ ],
132
+ 'condition' => [
133
+ 'premium_carousel_dot_navigation_show' => 'yes'
134
+ ]
135
+ ]
136
+ );
137
+
138
+ $this->add_responsive_control('premium_carousel_dot_offset',
139
+ [
140
+ 'label' => __( 'Horizontal Offset', 'premium-addons-for-elementor' ),
141
+ 'type' => Controls_Manager::SLIDER,
142
+ 'size_units' => ['px', 'em', '%'],
143
+ 'selectors' => [
144
+ '{{WRAPPER}} .premium-carousel-dots-above ul.slick-dots' => 'left: {{SIZE}}{{UNIT}}',
145
+ ],
146
+ 'condition' => [
147
+ 'premium_carousel_dot_navigation_show' => 'yes',
148
+ 'premium_carousel_dot_position' => 'above'
149
+ ]
150
+ ]
151
+ );
152
+
153
+ $this->add_responsive_control('premium_carousel_dot_voffset',
154
+ [
155
+ 'label' => __( 'Vertical Offset', 'premium-addons-for-elementor' ),
156
+ 'type' => Controls_Manager::SLIDER,
157
+ 'size_units' => ['px', 'em', '%'],
158
+ 'default' => [
159
+ 'unit' => '%',
160
+ 'size' => 50
161
+ ],
162
+ 'selectors' => [
163
+ '{{WRAPPER}} .premium-carousel-dots-above ul.slick-dots' => 'top: {{SIZE}}{{UNIT}}',
164
+ ],
165
+ 'condition' => [
166
+ 'premium_carousel_dot_navigation_show' => 'yes',
167
+ 'premium_carousel_dot_position' => 'above'
168
+ ]
169
+ ]
170
+ );
171
+
172
+ $this->add_control('premium_carousel_navigation_show',
173
+ [
174
+ 'label' => __( 'Arrows', 'premium-addons-for-elementor' ),
175
+ 'description' => __( 'Enable or disable navigation arrows', 'premium-addons-for-elementor' ),
176
+ 'type' => Controls_Manager::SWITCHER,
177
+ 'separator' => 'before',
178
+ 'default' => 'yes'
179
+ ]
180
+ );
181
 
182
  $this->add_control('premium_carousel_slides_to_show',
183
  [
184
  'label' => __( 'Appearance', 'premium-addons-for-elementor' ),
185
  'type' => Controls_Manager::SELECT,
186
  'default' => 'all',
187
+ 'separator' => 'before',
188
  'options' => [
189
  'all' => __( 'All visible', 'premium-addons-for-elementor' ),
190
  'single' => __( 'One at a time', 'premium-addons-for-elementor' )
238
  'label' => __( 'Fade', 'premium-addons-for-elementor' ),
239
  'type' => Controls_Manager::SWITCHER,
240
  'description' => __( 'Enable fade transition between slides', 'premium-addons-for-elementor' ),
241
+ 'condition' => [
242
+ 'premium_carousel_slider_type' => 'horizontal',
243
+ ]
244
  ]
245
  );
246
 
249
  'label' => __( 'Zoom Effect', 'premium-addons-for-elementor' ),
250
  'type' => Controls_Manager::SWITCHER,
251
  'condition' => [
252
+ 'premium_carousel_fade' => 'yes',
253
+ 'premium_carousel_slider_type' => 'horizontal',
254
  ]
255
  ]
256
  );
306
  $this->start_controls_section('premium_carousel_navigation_arrows',
307
  [
308
  'label' => __( 'Navigation Arrows', 'premium-addons-for-elementor' ),
309
+ 'tab' => Controls_Manager::TAB_STYLE,
310
+ 'condition' => [
311
+ 'premium_carousel_navigation_show' => 'yes'
312
+ ]
 
 
 
 
 
 
313
  ]
314
  );
315
 
573
  $this->start_controls_section('premium_carousel_navigation_dots',
574
  [
575
  'label' => __( 'Navigation Dots', 'premium-addons-for-elementor' ),
576
+ 'tab' => Controls_Manager::TAB_STYLE,
577
+ 'condition' => [
578
+ 'premium_carousel_dot_navigation_show' => 'yes'
579
+ ]
 
 
 
 
 
 
580
  ]
581
  );
582
 
1000
  $extra_class,
1001
  $dir
1002
  ] );
1003
+
1004
+ if( 'yes' == $settings['premium_carousel_dot_navigation_show'] ) {
1005
+ $this->add_render_attribute( 'carousel', 'class', 'premium-carousel-dots-' . $settings['premium_carousel_dot_position'] );
1006
+
1007
+ }
1008
 
1009
  if( $settings['premium_carousel_fade'] == 'yes' && $settings['premium_carousel_zoom'] == 'yes' ) {
1010
+ $this->add_render_attribute( 'carousel', 'class', 'premium-carousel-scale' );
1011
  }
1012
 
1013
  $this->add_render_attribute( 'carousel', 'data-settings', wp_json_encode( $carousel_settings ) );