Premium Addons for Elementor - Version 2.3.8

Version Description

  • Tweak: Added HTML post title tag option for Premium Blog widget.
  • Tweak: Added Masonry option for Premium Blog widget.
  • Fix: Responsive issues in Premium Blog widget.
Download this release

Release Info

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

Code changes from version 2.3.7 to 2.3.8

admin/settings-page.php CHANGED
@@ -373,7 +373,7 @@ class PA_admin_settings {
373
374
<tr class="pa-roll-row">
375
<th>Rollback Version</th>
376
- <td><div><?php echo sprintf( '<a target="_blank" href="%s" class="button pa-btn pa-rollback-button elementor-button-spinner">Reinstall Version 2.3.6</a>', wp_nonce_url( admin_url( 'admin-post.php?action=premium_addons_rollback' ), 'premium_addons_rollback' ) ); ?> </div><p class="pa-roll-desc"><span>Warning: Please backup your database before making the rollback.</span></p></td>
377
</tr>
378
<tr>
379
<th><h4 class="pa-beta-test">Become a Beta Tester</h4><span class="pa-beta-test-span">Turn-on Beta Tester, to get notified when a new beta version of Premium Addons for Elementor. The Beta version will not install automatically. You always have the option to ignore it.</span></th>
373
374
<tr class="pa-roll-row">
375
<th>Rollback Version</th>
376
+ <td><div><?php echo sprintf( '<a target="_blank" href="%s" class="button pa-btn pa-rollback-button elementor-button-spinner">Reinstall Version 2.3.7</a>', wp_nonce_url( admin_url( 'admin-post.php?action=premium_addons_rollback' ), 'premium_addons_rollback' ) ); ?> </div><p class="pa-roll-desc"><span>Warning: Please backup your database before making the rollback.</span></p></td>
377
</tr>
378
<tr>
379
<th><h4 class="pa-beta-test">Become a Beta Tester</h4><span class="pa-beta-test-span">Turn-on Beta Tester, to get notified when a new beta version of Premium Addons for Elementor. The Beta version will not install automatically. You always have the option to ignore it.</span></th>
assets/css/premium-addons.css CHANGED
@@ -1853,6 +1853,26 @@ button.premium-modal-box-modal-close {
1853
border-radius: 0;
1854
font-size: 17.8px;
1855
}
1856
@media (max-width: 768px) {
1857
.premium-blog-content-wrapper {
1858
top: 0;
1853
border-radius: 0;
1854
font-size: 17.8px;
1855
}
1856
+ .premium-blog-wrap.col-3 .premium-blog-entry-meta,
1857
+ .premium-blog-wrap.col-3 .premium-blog-post-content,
1858
+ .premium-blog-wrap.col-3 .premium-blog-post-tags-container,
1859
+ .premium-blog-wrap.col-4 .premium-blog-entry-meta,
1860
+ .premium-blog-wrap.col-4 .premium-blog-post-content,
1861
+ .premium-blog-wrap.col-4 .premium-blog-post-tags-container {
1862
+ margin-left: 0;
1863
+ }
1864
+ .premium-blog-wrap.col-3 .premium-blog-format-container,
1865
+ .premium-blog-wrap.col-4 .premium-blog-format-container {
1866
+ display: none;
1867
+ }
1868
+ .premium-blog-wrap.col-3 .premium-blog-entry-title,
1869
+ .premium-blog-wrap.col-4 .premium-blog-entry-title {
1870
+ line-height: 1;
1871
+ }
1872
+ .premium-blog-wrap.col-3 .premium-blog-entry-title a,
1873
+ .premium-blog-wrap.col-4 .premium-blog-entry-title a{
1874
+ font-size: 20px;
1875
+ }
1876
@media (max-width: 768px) {
1877
.premium-blog-content-wrapper {
1878
top: 0;
assets/js/premium-addons.js CHANGED
@@ -377,6 +377,26 @@
377
});
378
}
379
};
380
381
//Elementor JS Hooks
382
$(window).on('elementor/frontend/init', function () {
@@ -388,6 +408,7 @@
388
elementorFrontend.hooks.addAction('frontend/element_ready/premium-carousel-widget.default',PremiumCarouselHandler);
389
elementorFrontend.hooks.addAction('frontend/element_ready/premium-addon-banner.default',PremiumBannerHandler);
390
elementorFrontend.hooks.addAction('frontend/element_ready/premium-addon-modal-box.default',PremiumModalBoxHandler);
391
if(elementorFrontend.isEditMode()){
392
elementorFrontend.hooks.addAction('frontend/element_ready/premium-addon-progressbar.default', PremiumProgressBarWidgetHandler);
393
} else {
377
});
378
}
379
};
380
+ //Premium Blog Handler
381
+ var PremiumBlogHandler = function ($scope,$){
382
+ var blogElement = $scope.find('.premium-blog-wrap'),
383
+ masonryBlog = blogElement.data('masonry');
384
+ if ( masonryBlog ) {
385
+ blogElement.imagesLoaded(function(){
386
+ blogElement.isotope({
387
+ itemSelector: '.premium-blog-post-container',
388
+ percentPosition: true,
389
+ animationOptions: {
390
+ duration: 750,
391
+ easing: 'linear',
392
+ queue: false
393
+ }
394
+ });
395
+ });
396
+ }
397
+ };
398
+
399
+
400
401
//Elementor JS Hooks
402
$(window).on('elementor/frontend/init', function () {
408
elementorFrontend.hooks.addAction('frontend/element_ready/premium-carousel-widget.default',PremiumCarouselHandler);
409
elementorFrontend.hooks.addAction('frontend/element_ready/premium-addon-banner.default',PremiumBannerHandler);
410
elementorFrontend.hooks.addAction('frontend/element_ready/premium-addon-modal-box.default',PremiumModalBoxHandler);
411
+ elementorFrontend.hooks.addAction('frontend/element_ready/premium-addon-blog.default',PremiumBlogHandler);
412
if(elementorFrontend.isEditMode()){
413
elementorFrontend.hooks.addAction('frontend/element_ready/premium-addon-progressbar.default', PremiumProgressBarWidgetHandler);
414
} else {
premium-addons-for-elementor.php CHANGED
@@ -3,7 +3,7 @@
3
Plugin Name: Premium Addons for Elementor
4
Description: Premium Addons Plugin Includes 20 premium widgets for Elementor Page Builder.
5
Plugin URI: https://premiumaddons.com
6
- Version: 2.3.7
7
Author: Leap13
8
Author URI: http://leap13.com/
9
Text Domain: premium-addons-for-elementor
@@ -22,12 +22,12 @@ if( !function_exists('add_action') ) {
22
23
if( !defined( 'ABSPATH' ) ) exit; // No access of directly access
24
25
- define( 'PREMIUM_ADDONS_VERSION', '2.3.7' );
26
define( 'PREMIUM_ADDONS_URL', plugins_url('/', __FILE__ ) );
27
define( 'PREMIUM_ADDONS_PATH', plugin_dir_path( __FILE__ ) );
28
define( 'PREMIUM_ADDONS_FILE', __FILE__ );
29
define( 'PREMIUM_ADDONS_BASENAME', plugin_basename(__FILE__));
30
- define( 'PREMIUM_ADDONS_STABLE_VERSION', '2.3.6');
31
32
33
/**
@@ -146,7 +146,7 @@ define( 'PREMIUM_ADDONS_STABLE_VERSION', '2.3.6');
146
$check_component_active = get_option('pa_save_settings', $pa_default_settings);
147
148
if( $check_component_active['premium-progressbar'] ) {
149
- wp_register_script( 'premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
150
wp_register_script('waypoints', PREMIUM_ADDONS_URL . 'assets/js/lib/jquery.waypoints.js' , array('jquery'), PREMIUM_ADDONS_VERSION , true);
151
}
152
@@ -155,7 +155,7 @@ define( 'PREMIUM_ADDONS_STABLE_VERSION', '2.3.6');
155
}
156
157
if( $check_component_active['premium-grid'] ) {
158
- wp_register_script( 'premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
159
wp_register_script('isotope-js', PREMIUM_ADDONS_URL . 'assets/js/lib/isotope.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true);
160
wp_register_script('prettyPhoto-js', PREMIUM_ADDONS_URL . 'assets/js/lib/prettyPhoto.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true);
161
}
@@ -194,6 +194,10 @@ define( 'PREMIUM_ADDONS_STABLE_VERSION', '2.3.6');
194
if ($check_component_active['premium-maps']) {
195
wp_register_script('premium-maps-js', PREMIUM_ADDONS_URL . 'assets/js/premium-maps.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
196
}
197
}
198
199
public function premium_addons_widget_register() {
3
Plugin Name: Premium Addons for Elementor
4
Description: Premium Addons Plugin Includes 20 premium widgets for Elementor Page Builder.
5
Plugin URI: https://premiumaddons.com
6
+ Version: 2.3.8
7
Author: Leap13
8
Author URI: http://leap13.com/
9
Text Domain: premium-addons-for-elementor
22
23
if( !defined( 'ABSPATH' ) ) exit; // No access of directly access
24
25
+ define( 'PREMIUM_ADDONS_VERSION', '2.3.8' );
26
define( 'PREMIUM_ADDONS_URL', plugins_url('/', __FILE__ ) );
27
define( 'PREMIUM_ADDONS_PATH', plugin_dir_path( __FILE__ ) );
28
define( 'PREMIUM_ADDONS_FILE', __FILE__ );
29
define( 'PREMIUM_ADDONS_BASENAME', plugin_basename(__FILE__));
30
+ define( 'PREMIUM_ADDONS_STABLE_VERSION', '2.3.7');
31
32
33
/**
146
$check_component_active = get_option('pa_save_settings', $pa_default_settings);
147
148
if( $check_component_active['premium-progressbar'] ) {
149
+ wp_register_script('premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
150
wp_register_script('waypoints', PREMIUM_ADDONS_URL . 'assets/js/lib/jquery.waypoints.js' , array('jquery'), PREMIUM_ADDONS_VERSION , true);
151
}
152
155
}
156
157
if( $check_component_active['premium-grid'] ) {
158
+ wp_register_script('premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true );
159
wp_register_script('isotope-js', PREMIUM_ADDONS_URL . 'assets/js/lib/isotope.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true);
160
wp_register_script('prettyPhoto-js', PREMIUM_ADDONS_URL . 'assets/js/lib/prettyPhoto.js', array( 'jquery' ), PREMIUM_ADDONS_VERSION, true);
161
}
194
if ($check_component_active['premium-maps']) {
195
wp_register_script('premium-maps-js', PREMIUM_ADDONS_URL . 'assets/js/premium-maps.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
196
}
197
+ if ($check_component_active['premium-blog']) {
198
+ wp_register_script('isotope-js', PREMIUM_ADDONS_URL . 'assets/js/lib/isotope.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
199
+ wp_register_script('premium-addons-js', PREMIUM_ADDONS_URL . 'assets/js/premium-addons.js', array('jquery'), PREMIUM_ADDONS_VERSION, true);
200
+ }
201
}
202
203
public function premium_addons_widget_register() {
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: http://premiumaddons.com
5
Requires at least: 4.5
6
Tested up to: 4.9.6
7
Requires PHP: 5.4
8
- Stable tag: 2.3.7
9
License: GPL v3.0
10
License URI: https://opensource.org/licenses/GPL-3.0
11
@@ -99,6 +99,12 @@ Premium Addons for Elementor is light weight and we also gave you the control to
99
100
== Changelog ==
101
102
= 2.3.7 =
103
104
- Fix: Post Format Icon style tab issue in Premium Blog Widget.
5
Requires at least: 4.5
6
Tested up to: 4.9.6
7
Requires PHP: 5.4
8
+ Stable tag: 2.3.8
9
License: GPL v3.0
10
License URI: https://opensource.org/licenses/GPL-3.0
11
99
100
== Changelog ==
101
102
+ = 2.3.8 =
103
+
104
+ - Tweak: Added HTML post title tag option for Premium Blog widget.
105
+ - Tweak: Added Masonry option for Premium Blog widget.
106
+ - Fix: Responsive issues in Premium Blog widget.
107
+
108
= 2.3.7 =
109
110
- Fix: Post Format Icon style tab issue in Premium Blog Widget.
widgets/premium-blog.php CHANGED
@@ -1,6 +1,8 @@
1
<?php
2
namespace Elementor;
3
4
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
5
6
class Premium_Blog_Widget extends Widget_Base
@@ -17,6 +19,13 @@ class Premium_Blog_Widget extends Widget_Base
17
return true;
18
}
19
20
public function get_icon() {
21
return 'pa-blog';
22
}
@@ -97,6 +106,24 @@ class Premium_Blog_Widget extends Widget_Base
97
'options' => premium_addons_post_type_categories(),
98
]
99
);
100
101
/*Grid*/
102
$this->add_control('premium_blog_grid',
@@ -105,6 +132,18 @@ class Premium_Blog_Widget extends Widget_Base
105
'type' => Controls_Manager::SWITCHER,
106
]
107
);
108
109
/*Masonry Number of Columns*/
110
$this->add_control('premium_blog_columns_number',
@@ -743,6 +782,39 @@ class Premium_Blog_Widget extends Widget_Base
743
/*End Paging Style Section*/
744
$this->end_controls_section();
745
746
}
747
748
protected function render($instance = [])
@@ -775,7 +847,20 @@ class Premium_Blog_Widget extends Widget_Base
775
776
$excerpt_type = $settings['premium_blog_excerpt_type'];
777
$excerpt_text = $settings['premium_blog_excerpt_text'];
778
?>
779
<?php
780
if(count($posts)){
781
global $post;
@@ -814,7 +899,7 @@ if(count($posts)){
814
</div>
815
<?php endif; ?>
816
<div class="premium-blog-entry-container">
817
- <h2 class="premium-blog-entry-title"><a href="<?php the_permalink(); ?>" target="<?php echo esc_attr($target); ?>"><?php the_title(); ?></a></h2>
818
<div class="premium-blog-entry-meta" style="<?php if( $settings['premium_blog_post_format_icon'] !== 'yes' ) : echo 'margin-left:0px'; endif; ?>">
819
<?php if( $settings['premium_blog_author_meta'] === 'yes' ) : ?>
820
<span class="premium-blog-post-author premium-blog-meta-data"><i class="fa fa-user fa-fw"></i><?php the_author_posts_link();?></span>
@@ -875,8 +960,10 @@ if(count($posts)){
875
?>
876
</div>
877
<?php endif; ?>
878
<?php
879
- wp_reset_postdata();
880
881
} ?>
882
1
<?php
2
namespace Elementor;
3
4
+ use Elementor\Core\Responsive\Responsive;
5
+
6
if ( ! defined( 'ABSPATH' ) ) exit; // If this file is called directly, abort.
7
8
class Premium_Blog_Widget extends Widget_Base
19
return true;
20
}
21
22
+ public function get_script_depends(){
23
+ return [
24
+ 'isotope-js',
25
+ 'premium-addons-js'
26
+ ];
27
+ }
28
+
29
public function get_icon() {
30
return 'pa-blog';
31
}
106
'options' => premium_addons_post_type_categories(),
107
]
108
);
109
+
110
+ $this->add_control('premium_blog_title_tag',
111
+ [
112
+ 'label' => esc_html__( 'Title HTML Tag', 'premium-addons-for-elementor' ),
113
+ 'description' => esc_html__( 'Select a heading tag for the post title.', 'premium-addons-for-elementor' ),
114
+ 'type' => Controls_Manager::SELECT,
115
+ 'default' => 'h2',
116
+ 'options' => [
117
+ 'h1' => 'H1',
118
+ 'h2' => 'H2',
119
+ 'h3' => 'H3',
120
+ 'h4' => 'H4',
121
+ 'h5' => 'H5',
122
+ 'h6' => 'H6',
123
+ ],
124
+ 'label_block' => true,
125
+ ]
126
+ );
127
128
/*Grid*/
129
$this->add_control('premium_blog_grid',
132
'type' => Controls_Manager::SWITCHER,
133
]
134
);
135
+
136
+ /*Masonry*/
137
+ $this->add_control('premium_blog_masonry',
138
+ [
139
+ 'label' => esc_html__('Masonry', 'premium-addons-for-elementor'),
140
+ 'type' => Controls_Manager::SWITCHER,
141
+ 'return_value' => 'true',
142
+ 'condition' => [
143
+ 'premium_blog_grid' => 'yes'
144
+ ]
145
+ ]
146
+ );
147
148
/*Masonry Number of Columns*/
149
$this->add_control('premium_blog_columns_number',
782
/*End Paging Style Section*/
783
$this->end_controls_section();
784
785
+ }
786
+
787
+ protected function get_blog_responsive_style() {
788
+
789
+ $breakpoints = Responsive::get_breakpoints();
790
+
791
+ $style = '<style>';
792
+ $style .= '@media ( max-width: ' . $breakpoints['lg'] . 'px ) {';
793
+ $style .= '.premium-blog-entry-title {';
794
+ $style .= 'line-height: 1;';
795
+ $style .= '}';
796
+ $style .= '.premium-blog-entry-title a {';
797
+ $style .= 'font-size: 18px;';
798
+ $style .= '}';
799
+ $style .= '}';
800
+ $style .= '@media ( max-width: ' . $breakpoints['md'] . 'px ) {';
801
+ $style .= '.premium-blog-post-container {';
802
+ $style .= 'width: 100% !important;';
803
+ $style .= '}';
804
+ $style .= '.premium-blog-content-wrapper {';
805
+ $style .= 'padding: 15px;';
806
+ $style .= '}';
807
+ $style .= '.premium-blog-entry-title {';
808
+ $style .= 'line-height: 1;';
809
+ $style .= '}';
810
+ $style .= '.premium-blog-entry-title a {';
811
+ $style .= 'font-size: 16px;';
812
+ $style .= '}';
813
+ $style .= '}';
814
+ $style .= '</style>';
815
+
816
+ return $style;
817
+
818
}
819
820
protected function render($instance = [])
847
848
$excerpt_type = $settings['premium_blog_excerpt_type'];
849
$excerpt_text = $settings['premium_blog_excerpt_text'];
850
+
851
+ switch($settings['premium_blog_columns_number']){
852
+ case '50%' :
853
+ $col_number = 'col-2';
854
+ break;
855
+ case '33.33%' :
856
+ $col_number = 'col-3';
857
+ break;
858
+ case '25%' :
859
+ $col_number = 'col-4';
860
+ break;
861
+ }
862
?>
863
+ <div class="premium-blog-wrap <?php echo esc_attr($col_number); ?>" data-masonry="<?php echo esc_attr($settings['premium_blog_masonry']); ?>">
864
<?php
865
if(count($posts)){
866
global $post;
899
</div>
900
<?php endif; ?>
901
<div class="premium-blog-entry-container">
902
+ <<?php echo $settings['premium_blog_title_tag']; ?> class="premium-blog-entry-title"><a href="<?php the_permalink(); ?>" target="<?php echo esc_attr($target); ?>"><?php the_title(); ?></a></<?php echo $settings['premium_blog_title_tag']; ?>>
903
<div class="premium-blog-entry-meta" style="<?php if( $settings['premium_blog_post_format_icon'] !== 'yes' ) : echo 'margin-left:0px'; endif; ?>">
904
<?php if( $settings['premium_blog_author_meta'] === 'yes' ) : ?>
905
<span class="premium-blog-post-author premium-blog-meta-data"><i class="fa fa-user fa-fw"></i><?php the_author_posts_link();?></span>
960
?>
961
</div>
962
<?php endif; ?>
963
+ </div>
964
<?php
965
+ echo $this->get_blog_responsive_style();
966
+ wp_reset_postdata();
967
968
} ?>
969