Version Description
- Tweak: Added enable/disable related videos option in Premium Video Box widget.
Download this release
Release Info
Developer | leap13 |
Plugin | Premium Addons for Elementor |
Version | 2.6.1 |
Comparing to | |
See all releases |
Code changes from version 2.6.0 to 2.6.1
- admin/settings/version-control.php +1 -1
- assets/js/premium-addons.js +11 -2
- premium-addons-for-elementor.php +3 -3
- readme.txt +5 -1
- widgets/premium-maps.php +2 -2
- widgets/premium-videobox.php +17 -2
admin/settings/version-control.php
CHANGED
@@ -80,7 +80,7 @@ class PA_Version_Control {
|
|
80 |
<tr class="pa-roll-row">
|
81 |
<th>Rollback Version</th>
|
82 |
<td>
|
83 |
-
<div><?php echo sprintf( '<a target="_blank" href="%s" class="button pa-btn pa-rollback-button elementor-button-spinner">Reinstall Version 2.
|
84 |
<p class="pa-roll-desc"><span>Warning: Please backup your database before making the rollback.</span></p>
|
85 |
</td>
|
86 |
</tr>
|
80 |
<tr class="pa-roll-row">
|
81 |
<th>Rollback Version</th>
|
82 |
<td>
|
83 |
+
<div><?php echo sprintf( '<a target="_blank" href="%s" class="button pa-btn pa-rollback-button elementor-button-spinner">Reinstall Version 2.6.0/a>', wp_nonce_url( admin_url( 'admin-post.php?action=premium_addons_rollback' ), 'premium_addons_rollback' ) ); ?> </div>
|
84 |
<p class="pa-roll-desc"><span>Warning: Please backup your database before making the rollback.</span></p>
|
85 |
</td>
|
86 |
</tr>
|
assets/js/premium-addons.js
CHANGED
@@ -21,7 +21,9 @@
|
|
21 |
};
|
22 |
//Premium Video Box Handler
|
23 |
var PremiumVideoBoxWidgetHandler = function($scope,$){
|
24 |
-
var videoBoxElement = $scope.find('.premium-video-box-container')
|
|
|
|
|
25 |
videoBoxElement.on( "click", function(){
|
26 |
$( this ).children( ".premium-video-box-video-container" ).css(
|
27 |
{
|
@@ -29,7 +31,14 @@
|
|
29 |
'visibility': 'visible'
|
30 |
} );
|
31 |
setTimeout(function(){
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
},600);
|
34 |
});
|
35 |
};
|
21 |
};
|
22 |
//Premium Video Box Handler
|
23 |
var PremiumVideoBoxWidgetHandler = function($scope,$){
|
24 |
+
var videoBoxElement = $scope.find('.premium-video-box-container'),
|
25 |
+
vidSrc,
|
26 |
+
checkRel;
|
27 |
videoBoxElement.on( "click", function(){
|
28 |
$( this ).children( ".premium-video-box-video-container" ).css(
|
29 |
{
|
31 |
'visibility': 'visible'
|
32 |
} );
|
33 |
setTimeout(function(){
|
34 |
+
vidSrc = videoBoxElement.find("iframe").attr('src');
|
35 |
+
checkRel = vidSrc.indexOf('rel=0');
|
36 |
+
if( -1 !== checkRel ) {
|
37 |
+
videoBoxElement.find("iframe").attr('src', videoBoxElement.find("iframe").attr('src') + '&autoplay=1');
|
38 |
+
} else {
|
39 |
+
videoBoxElement.find("iframe").attr('src', videoBoxElement.find("iframe").attr('src') + '?autoplay=1');
|
40 |
+
}
|
41 |
+
|
42 |
},600);
|
43 |
});
|
44 |
};
|
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.6.
|
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 |
if (!defined('ABSPATH')) exit; // No access of directly access
|
23 |
|
24 |
|
25 |
-
define('PREMIUM_ADDONS_VERSION', '2.6.
|
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.
|
31 |
|
32 |
/**
|
33 |
* Loading text domain, Including required files
|
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.6.1
|
7 |
Author: Leap13
|
8 |
Author URI: http://leap13.com/
|
9 |
Text Domain: premium-addons-for-elementor
|
22 |
if (!defined('ABSPATH')) exit; // No access of directly access
|
23 |
|
24 |
|
25 |
+
define('PREMIUM_ADDONS_VERSION', '2.6.1');
|
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.6.0');
|
31 |
|
32 |
/**
|
33 |
* Loading text domain, Including required files
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Donate link: http://premiumaddons.com
|
|
5 |
Requires at least: 4.5
|
6 |
Tested up to: 4.9.8
|
7 |
Requires PHP: 5.4
|
8 |
-
Stable tag: 2.6.
|
9 |
License: GPL v3.0
|
10 |
License URI: https://opensource.org/licenses/GPL-3.0
|
11 |
|
@@ -135,6 +135,10 @@ Premium Addons for Elementor is 100% Ads Free, Ads can only be detected from You
|
|
135 |
|
136 |
== Changelog ==
|
137 |
|
|
|
|
|
|
|
|
|
138 |
= 2.6.0 =
|
139 |
|
140 |
- Fixed: Warning "Cannot redeclare control with same name premium_gallery_img_alt".
|
5 |
Requires at least: 4.5
|
6 |
Tested up to: 4.9.8
|
7 |
Requires PHP: 5.4
|
8 |
+
Stable tag: 2.6.1
|
9 |
License: GPL v3.0
|
10 |
License URI: https://opensource.org/licenses/GPL-3.0
|
11 |
|
135 |
|
136 |
== Changelog ==
|
137 |
|
138 |
+
= 2.6.1 =
|
139 |
+
|
140 |
+
- Tweak: Added enable/disable related videos option in Premium Video Box widget.
|
141 |
+
|
142 |
= 2.6.0 =
|
143 |
|
144 |
- Fixed: Warning "Cannot redeclare control with same name premium_gallery_img_alt".
|
widgets/premium-maps.php
CHANGED
@@ -45,8 +45,8 @@ class Premium_Maps_Widget extends Widget_Base
|
|
45 |
);
|
46 |
|
47 |
$map_api = get_option( 'pa_maps_save_settings' )['premium-map-api'];
|
48 |
-
|
49 |
-
if( ! isset( $map_api ) || empty( $map_api )
|
50 |
$this->add_control('premium_maps_api_url',
|
51 |
[
|
52 |
'label' => '<span style="line-height: 1.4em;">Premium Maps requires an API key. Get your API key from <a target="_blank" href="https://developers.google.com/maps/documentation/javascript/get-api-key">here</a> and add it to Premium Addons admin page. Go to Dashboard -> Premium Addons for Elementor -> Google Maps API</span>',
|
45 |
);
|
46 |
|
47 |
$map_api = get_option( 'pa_maps_save_settings' )['premium-map-api'];
|
48 |
+
|
49 |
+
if( ! isset( $map_api ) || empty( $map_api ) ){
|
50 |
$this->add_control('premium_maps_api_url',
|
51 |
[
|
52 |
'label' => '<span style="line-height: 1.4em;">Premium Maps requires an API key. Get your API key from <a target="_blank" href="https://developers.google.com/maps/documentation/javascript/get-api-key">here</a> and add it to Premium Addons admin page. Go to Dashboard -> Premium Addons for Elementor -> Google Maps API</span>',
|
widgets/premium-videobox.php
CHANGED
@@ -99,6 +99,19 @@ class Premium_Video_Box_Widget extends Widget_Base
|
|
99 |
]
|
100 |
);
|
101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
/*End Image Settings Section*/
|
103 |
$this->end_controls_section();
|
104 |
|
@@ -509,6 +522,8 @@ class Premium_Video_Box_Widget extends Widget_Base
|
|
509 |
$video_id = $settings['premium_video_box_video_id'];
|
510 |
|
511 |
$video_embed = $settings['premium_video_box_video_embed'];
|
|
|
|
|
512 |
?>
|
513 |
|
514 |
<div class="premium-video-box-container" id="premium-video-box-container-<?php echo esc_attr( $this->get_id() ); ?>">
|
@@ -528,10 +543,10 @@ class Premium_Video_Box_Widget extends Widget_Base
|
|
528 |
<div class="premium-video-box-video-container">
|
529 |
<?php if ( $video_type === 'youtube'){ ?>
|
530 |
<?php if ( $video_url_type === 'id' && !empty( $video_id ) ) : ?>
|
531 |
-
<iframe src="https://www.youtube.com/embed/<?php echo $video_id; ?>" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen>
|
532 |
</iframe>
|
533 |
<?php elseif ( $video_url_type === 'embed' && !empty( $video_embed ) ) : ?>
|
534 |
-
<iframe src="<?php echo $video_embed; ?>" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen>
|
535 |
</iframe>
|
536 |
<?php endif; ?>
|
537 |
<?php } elseif ( $video_type === 'vimeo'){ ?>
|
99 |
]
|
100 |
);
|
101 |
|
102 |
+
/*Related Videos*/
|
103 |
+
$this->add_control('premium_video_box_related_video',
|
104 |
+
[
|
105 |
+
'label' => esc_html__('Show Related Videos', 'premium-addons-for-elementor'),
|
106 |
+
'type' => Controls_Manager::SWITCHER,
|
107 |
+
'description' => esc_html__('Enable/Disable related videos after the video'),
|
108 |
+
'default' => 'yes',
|
109 |
+
'condition' => [
|
110 |
+
'premium_video_box_video_type' => 'youtube',
|
111 |
+
]
|
112 |
+
]
|
113 |
+
);
|
114 |
+
|
115 |
/*End Image Settings Section*/
|
116 |
$this->end_controls_section();
|
117 |
|
522 |
$video_id = $settings['premium_video_box_video_id'];
|
523 |
|
524 |
$video_embed = $settings['premium_video_box_video_embed'];
|
525 |
+
|
526 |
+
$rel_videos = ( 'yes' == $settings['premium_video_box_related_video'] && isset( $settings['premium_video_box_related_video'] ) ) ? '' : '?rel=0';
|
527 |
?>
|
528 |
|
529 |
<div class="premium-video-box-container" id="premium-video-box-container-<?php echo esc_attr( $this->get_id() ); ?>">
|
543 |
<div class="premium-video-box-video-container">
|
544 |
<?php if ( $video_type === 'youtube'){ ?>
|
545 |
<?php if ( $video_url_type === 'id' && !empty( $video_id ) ) : ?>
|
546 |
+
<iframe src="https://www.youtube.com/embed/<?php echo $video_id . $rel_videos; ?>" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen>
|
547 |
</iframe>
|
548 |
<?php elseif ( $video_url_type === 'embed' && !empty( $video_embed ) ) : ?>
|
549 |
+
<iframe src="<?php echo $video_embed . $rel_videos; ?>" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen>
|
550 |
</iframe>
|
551 |
<?php endif; ?>
|
552 |
<?php } elseif ( $video_type === 'vimeo'){ ?>
|