Premium Addons for Elementor - Version 3.3.5

Version Description

  • Tweak: Added Load Markers Clustering JS File option to admin Google Maps API page.
  • Tweak: Added Pull Excerpt From Content Box option in Blog widget.
  • Tweak: Separate Excerpt link style options from meta tab in Blog widget.
Download this release

Release Info

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

Code changes from version 3.3.4 to 3.3.5

admin/assets/css/admin.css CHANGED
@@ -1 +1 @@
1
- .pa-header-wrapper{padding:20px;overflow:hidden}.pa-title-left{width:80%;float:left}h1.pa-title-main{padding:0;line-height:1.3em;font-size:42px;margin-top:5px}.pa-title-sub{color:#777;font-weight:400;margin-left:3px}.pa-title-right{float:right}.pa-title-right img{width:100px;height:100px}.button.pa-btn{border:none;color:#fff;text-align:center;padding:3px;max-width:250px;height:auto;margin-bottom:15px;display:block;font-weight:700;box-shadow:none}.pa-btn.pa-save-button{background-color:#1A7FC2;margin-bottom:0;margin-top:30px;padding:3px 10px}.pa-btn.pa-save-button:hover{background:#0e629a;color:#fff}.pa-btn.pa-save-button:focus{background:#0e629a;color:#fff}.pa-settings-tabs-list{margin:0;border-bottom:1px solid #ccc}.pa-settings-tabs-list li{display:inline-block;margin-bottom:4px;margin-left:.5em}.pa-tab-list-item{background:#e5e5e5;padding:9px 15px;line-height:30px;font-size:18px;font-weight:700;color:#444;text-decoration:none;border:1px solid #ccc;border-bottom:none}.pa-tab-list-item:focus{box-shadow:none}li.ui-state-default:not(.ui-state-active):hover a{background:#fff;color:#444}li.ui-state-active a{outline:none;color:#000;background:transparent;box-shadow:none;border-bottom:1px solid #f1f1f1}.pa-row{width:100%;overflow:hidden}.pa-settings-tabs{padding:15px 25px;margin-top:-3em}#pa-about{margin-top:50px}.pa-col-half{width:40%;height:auto;float:left}.pa-about-panel{width:100%;display:inline-block;margin-bottom:20px}.pa-icon-container{float:left;display:inline-block;width:45px}.pa-icon-container i{font-size:25px}.pa-text-container{display:inline-block;width:80%}.pa-text-container h4{margin:0;font-weight:400;font-size:18px}.pa-text-container p{line-height:22px;color:#444;font-size:13px;margin:1em 0}.pa-elements-table{border-collapse:collapse;margin-top:.5em;margin-left:5px;width:80%;clear:both}.pa-elements-table th{vertical-align:top;text-align:left;padding:20px 10px 20px 0;width:200px;line-height:1.3;font-weight:600}.pa-elements-table tr{border-bottom:1px solid #ddd}.pa-elements-table td{margin-bottom:9px;padding:15px 10px;line-height:1.3;vertical-align:middle}.pa-elements-table .pa-element-desc{font-weight:300;padding-bottom:1.5em;border-bottom:1px solid #ddd}.switch{position:relative;display:inline-block;width:70px;height:33px}.switch input{display:none}.slider,.pro-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#f2f2f2;box-shadow:0 0 2px 1px #ccc inset;-webkit-transition:.4s;transition:.4s}.slider:before,.pro-slider:before{position:absolute;content:"";height:27.5px;width:27.5px;left:0;bottom:1.1px;background:radial-gradient(farthest-corner at 14px 0px,#f0f0f0 50%,#cacaca 100%);-webkit-transition:.4s;transition:.4s;padding:0;margin:0;border:1px solid #c6c6c6;box-shadow:0 2.5px 5px #b8b8b9}input:checked + .slider{background-color:#18a4fd;box-shadow:0 0 2px 1px #149afd inset;border:1px solid #149afd}input:focus + .slider{box-shadow:0 0 1px #18a4fd}input:checked + .slider:before{box-shadow:0 2.5px 5px #0d6fbd;border:1px solid #0d6fbd;-webkit-transform:translateX(40px);-ms-transform:translateX(40px);transform:translateX(40px)}.slider.round,.pro-slider.round{border:1px solid #b8b8b9;border-radius:34px}.slider.round:before,.pro-slider.round:before{border-radius:50%}.pa-maps-table{text-align:left}.pa-api-title{display:inline-block;margin:0}.pa-api-disable-title label,.pa-is-beta label{margin-right:15px}.pa-api-disable-title span,.pa-is-beta span{font-weight:400}.pa-maps-api-notice{margin:10px 0 0}.pa-api-title input{margin-top:10px;font-size:normal;font-weight:400;width:400px;margin-left:30px}#pa-maintenance{margin-top:30px}.pa-beta-table tr{text-align:left}.pa-roll-back,.pa-beta-test{text-align:left;font-size:20px;font-weight:400;margin-top:15px;margin-bottom:10px}.pa-beta-test{margin-top:0}.pa-roll-back-span,.pa-beta-test-span{line-height:22px;color:#444;font-size:13px;margin:0;font-weight:400}.pa-roll-row,.pa-beta-row{float:left}.pa-beta-row{margin-top:13px}.pa-roll-row th,.pa-beta-row th{vertical-align:top;text-align:left;padding:20px 10px 20px 0;width:200px;line-height:1.3}.pa-roll-row td{padding:15px 10px}.pa-beta-row td{padding:22px 10px}.pa-roll-row .pa-rollback-button{box-shadow:0 1px 0 #ccc;color:#555;border:1px solid #ccc;background:#f7f7f7;vertical-align:top;margin:0;padding:0 10px 1px}.pa-roll-row .pa-rollback-button:hover{background:#fafafa;border-color:#999;color:#23282d}.pa-roll-row .pa-roll-desc{font-style:italic;color:red;margin-top:4px}.pa-beta-row .pa-beta-desc{font-style:italic;margin-top:4px}.pa-sys-info-tab{background:#f7f7f7;margin:8px;border:2px solid #ddd;border-radius:3px;padding:0}.pa-system-info-container{padding:10px}.pa-sys-info-tab .pa-sys-info-title{margin:0;margin-bottom:0;padding:10px;border-bottom:2px solid #ddd;background:#fff;margin-bottom:10px;font-weight:500}tr.pa-sec-elems-tr{border:none}tr.pa-sec-elems-tr th{padding-bottom:0}tr.pa-sec-elems-tr th h1{font-weight:700;font-size:25px;letter-spacing:1px;color:#555;margin-bottom:0}.pa-swal-head{display:block;margin-bottom:20px}.pa-swal-desc{font-weight:700;color:#0f6aa7}
1
+ .pa-header-wrapper{padding:20px;overflow:hidden}.pa-title-left{width:80%;float:left}h1.pa-title-main{padding:0;line-height:1.3em;font-size:42px;margin-top:5px}.pa-title-sub{color:#777;font-weight:400;margin-left:3px}.pa-title-right{float:right}.pa-title-right img{width:100px;height:100px}.button.pa-btn{border:none;color:#fff;text-align:center;padding:3px;max-width:250px;height:auto;margin-bottom:15px;display:block;font-weight:700;box-shadow:none}.pa-btn.pa-save-button{background-color:#1A7FC2;margin-bottom:0;margin-top:30px;padding:3px 10px}.pa-btn.pa-save-button:hover{background:#0e629a;color:#fff}.pa-btn.pa-save-button:focus{background:#0e629a;color:#fff}.pa-settings-tabs-list{margin:0;border-bottom:1px solid #ccc}.pa-settings-tabs-list li{display:inline-block;margin-bottom:4px;margin-left:.5em}.pa-tab-list-item{background:#e5e5e5;padding:9px 15px;line-height:30px;font-size:18px;font-weight:700;color:#444;text-decoration:none;border:1px solid #ccc;border-bottom:none}.pa-tab-list-item:focus{box-shadow:none}li.ui-state-default:not(.ui-state-active):hover a{background:#fff;color:#444}li.ui-state-active a{outline:none;color:#000;background:transparent;box-shadow:none;border-bottom:1px solid #f1f1f1}.pa-row{width:100%;overflow:hidden}.pa-settings-tabs{padding:15px 25px;margin-top:-3em}#pa-about{margin-top:50px}.pa-col-half{width:40%;height:auto;float:left}.pa-about-panel{width:100%;display:inline-block;margin-bottom:20px}.pa-icon-container{float:left;display:inline-block;width:45px}.pa-icon-container i{font-size:25px}.pa-text-container{display:inline-block;width:80%}.pa-text-container h4{margin:0;font-weight:400;font-size:18px}.pa-text-container p{line-height:22px;color:#444;font-size:13px;margin:1em 0}.pa-elements-table{border-collapse:collapse;margin-top:.5em;margin-left:5px;width:80%;clear:both}.pa-elements-table th{vertical-align:top;text-align:left;padding:20px 10px 20px 0;width:200px;line-height:1.3;font-weight:600}.pa-elements-table tr{border-bottom:1px solid #ddd}.pa-elements-table td{margin-bottom:9px;padding:15px 10px;line-height:1.3;vertical-align:middle}.pa-elements-table .pa-element-desc{font-weight:300;padding-bottom:1.5em;border-bottom:1px solid #ddd}.switch{position:relative;display:inline-block;width:70px;height:33px}.switch input{display:none}.slider,.pro-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#f2f2f2;box-shadow:0 0 2px 1px #ccc inset;-webkit-transition:.4s;transition:.4s}.slider:before,.pro-slider:before{position:absolute;content:"";height:27.5px;width:27.5px;left:0;bottom:1.1px;background:radial-gradient(farthest-corner at 14px 0px,#f0f0f0 50%,#cacaca 100%);-webkit-transition:.4s;transition:.4s;padding:0;margin:0;border:1px solid #c6c6c6;box-shadow:0 2.5px 5px #b8b8b9}input:checked + .slider{background-color:#18a4fd;box-shadow:0 0 2px 1px #149afd inset;border:1px solid #149afd}input:focus + .slider{box-shadow:0 0 1px #18a4fd}input:checked + .slider:before{box-shadow:0 2.5px 5px #0d6fbd;border:1px solid #0d6fbd;-webkit-transform:translateX(40px);-ms-transform:translateX(40px);transform:translateX(40px)}.slider.round,.pro-slider.round{border:1px solid #b8b8b9;border-radius:34px}.slider.round:before,.pro-slider.round:before{border-radius:50%}.pa-maps-table{text-align:left}.pa-api-title{display:inline-block;margin:0}.pa-maps-table tr td:first-of-type{padding-right: 1.2em;} .pa-maps-table td:first-of-type .pa-api-disable-title {margin:0.6em 0;}.pa-api-disable-title label,.pa-is-beta label{margin-right:15px}.pa-api-disable-title span,.pa-is-beta span{font-weight:400}.pa-maps-api-notice{margin:0.5em 0}.pa-api-title input{margin-top:10px;font-size:normal;font-weight:400;width:400px;margin-left:30px}#pa-maintenance{margin-top:30px}.pa-beta-table tr{text-align:left}.pa-roll-back,.pa-beta-test{text-align:left;font-size:20px;font-weight:400;margin-top:15px;margin-bottom:10px}.pa-beta-test{margin-top:0}.pa-roll-back-span,.pa-beta-test-span{line-height:22px;color:#444;font-size:13px;margin:0;font-weight:400}.pa-roll-row,.pa-beta-row{float:left}.pa-beta-row{margin-top:13px}.pa-roll-row th,.pa-beta-row th{vertical-align:top;text-align:left;padding:20px 10px 20px 0;width:200px;line-height:1.3}.pa-roll-row td{padding:15px 10px}.pa-beta-row td{padding:22px 10px}.pa-roll-row .pa-rollback-button{box-shadow:0 1px 0 #ccc;color:#555;border:1px solid #ccc;background:#f7f7f7;vertical-align:top;margin:0;padding:0 10px 1px}.pa-roll-row .pa-rollback-button:hover{background:#fafafa;border-color:#999;color:#23282d}.pa-roll-row .pa-roll-desc{font-style:italic;color:red;margin-top:4px}.pa-beta-row .pa-beta-desc{font-style:italic;margin-top:4px}.pa-sys-info-tab{background:#f7f7f7;margin:8px;border:2px solid #ddd;border-radius:3px;padding:0}.pa-system-info-container{padding:10px}.pa-sys-info-tab .pa-sys-info-title{margin:0;margin-bottom:0;padding:10px;border-bottom:2px solid #ddd;background:#fff;margin-bottom:10px;font-weight:500}tr.pa-sec-elems-tr{border:none}tr.pa-sec-elems-tr th{padding-bottom:0}tr.pa-sec-elems-tr th h1{font-weight:700;font-size:25px;letter-spacing:1px;color:#555;margin-bottom:0}.pa-swal-head{display:block;margin-bottom:20px}.pa-swal-desc{font-weight:700;color:#0f6aa7}
admin/settings/elements.php CHANGED
@@ -4,7 +4,7 @@ namespace PremiumAddons;
4
 
5
  if( ! defined( 'ABSPATH' ) ) exit(); // Exit if accessed directly
6
 
7
- class PA_admin_settings {
8
 
9
  protected $page_slug = 'premium-addons';
10
 
4
 
5
  if( ! defined( 'ABSPATH' ) ) exit(); // Exit if accessed directly
6
 
7
+ class PA_Elements_Settings {
8
 
9
  protected $page_slug = 'premium-addons';
10
 
admin/settings/{gomaps.php → maps.php} RENAMED
@@ -4,9 +4,9 @@ namespace PremiumAddons;
4
 
5
  if( ! defined( 'ABSPATH' ) ) exit;
6
 
7
- class PA_Gomaps {
8
 
9
- public static $pa_maps_keys = [ 'premium-map-api', 'premium-map-disable-api' ];
10
 
11
  private $pa_maps_default_settings;
12
 
@@ -15,19 +15,24 @@ class PA_Gomaps {
15
  private $pa_maps_get_settings;
16
 
17
  public function __construct() {
18
- add_action( 'admin_menu', array ($this,'create_gomaps_menu' ), 100 );
 
 
19
  add_action( 'wp_ajax_pa_maps_save_settings', array( $this, 'pa_save_maps_settings' ) );
 
20
  }
21
 
22
- public function create_gomaps_menu() {
 
23
  add_submenu_page(
24
  'premium-addons',
25
  '',
26
- 'Google Maps API',
27
  'manage_options',
28
  'premium-addons-maps',
29
- [$this, 'pa_maps_page']
30
  );
 
31
  }
32
 
33
  public function pa_maps_page() {
@@ -57,8 +62,8 @@ class PA_Gomaps {
57
  <form action="" method="POST" id="pa-maps" name="pa-maps">
58
  <div class="pa-header-wrapper">
59
  <div class="pa-title-left">
60
- <h1 class="pa-title-main"><?php echo Helper_Functions::name(); ?></h1>
61
- <h3 class="pa-title-sub"><?php echo sprintf(__('Thank you for using %s. This plugin has been developed by %s and we hope you enjoy using it.','premium-addons-for-elementor'), Helper_Functions::name(),Helper_Functions::author()); ?></h3>
62
  </div>
63
  <?php if( ! Helper_Functions::is_show_logo()) : ?>
64
  <div class="pa-title-right">
@@ -72,18 +77,32 @@ class PA_Gomaps {
72
  <table class="pa-maps-table">
73
  <tr>
74
  <p class="pa-maps-api-notice">
75
- <?php echo esc_html( Helper_Functions::get_prefix() ) . __('Maps Element requires Google API key to be entered below. If you don’t have one, click ', 'premium-addons-for-elementor'); ?><a href="https://developers.google.com/maps/documentation/javascript/get-api-key" target="_blank"><?php echo __('here', 'premium-addons-for-elementor'); ?></a><?php echo __(' to get your key.', 'premium-addons-for-elementor'); ?>
76
  </p>
77
  </tr>
78
  <tr>
79
- <th>
80
- <h4 class="pa-api-title"><label><?php echo __('Google Maps API Key:', 'premium-addons-for-elementor'); ?></label><input name="premium-map-api" id="premium-map-api" type="text" placeholder="API Key" value="<?php echo $this->pa_maps_get_settings['premium-map-api']; ?>"></h4>
81
- </th>
 
 
 
 
 
 
 
 
 
 
 
82
  </tr>
83
  <tr>
84
- <th>
85
- <h4 class="pa-api-disable-title"><label><?php echo __('Enable Maps API JS File:','premium-addons-for-elementor'); ?></label><input name="premium-map-disable-api" id="premium-map-disable-api" type="checkbox" <?php checked(1, $this->pa_maps_get_settings['premium-map-disable-api'], true) ?>><span><?php echo __('This will load API JS file if it\'s not loaded by another theme or plugin', 'premium-addons-for-elementor'); ?></span></h4>
86
- </th>
 
 
 
87
  </tr>
88
  </table>
89
  <input type="submit" value="<?php echo __('Save Settings', 'premium-addons-for-elementor'); ?>" class="button pa-btn pa-save-button">
@@ -122,7 +141,8 @@ class PA_Gomaps {
122
 
123
  $this->pa_maps_settings = array(
124
  'premium-map-api' => $settings['premium-map-api'],
125
- 'premium-map-disable-api' => intval( $settings['premium-map-disable-api'] ? 1 : 0),
 
126
  );
127
 
128
  update_option( 'pa_maps_save_settings', $this->pa_maps_settings );
4
 
5
  if( ! defined( 'ABSPATH' ) ) exit;
6
 
7
+ class PA_Maps {
8
 
9
+ public static $pa_maps_keys = [ 'premium-map-api', 'premium-map-disable-api', 'premium-map-cluster' ];
10
 
11
  private $pa_maps_default_settings;
12
 
15
  private $pa_maps_get_settings;
16
 
17
  public function __construct() {
18
+
19
+ add_action( 'admin_menu', array ( $this,'create_maps_menu' ), 100 );
20
+
21
  add_action( 'wp_ajax_pa_maps_save_settings', array( $this, 'pa_save_maps_settings' ) );
22
+
23
  }
24
 
25
+ public function create_maps_menu() {
26
+
27
  add_submenu_page(
28
  'premium-addons',
29
  '',
30
+ __('Google Maps API', 'premium-addons-for-elementor'),
31
  'manage_options',
32
  'premium-addons-maps',
33
+ [ $this, 'pa_maps_page' ]
34
  );
35
+
36
  }
37
 
38
  public function pa_maps_page() {
62
  <form action="" method="POST" id="pa-maps" name="pa-maps">
63
  <div class="pa-header-wrapper">
64
  <div class="pa-title-left">
65
+ <h1 class="pa-title-main"><?php echo Helper_Functions::name(); ?></h1>
66
+ <h3 class="pa-title-sub"><?php echo sprintf(__('Thank you for using %s. This plugin has been developed by %s and we hope you enjoy using it.','premium-addons-for-elementor'), Helper_Functions::name(), Helper_Functions::author()); ?></h3>
67
  </div>
68
  <?php if( ! Helper_Functions::is_show_logo()) : ?>
69
  <div class="pa-title-right">
77
  <table class="pa-maps-table">
78
  <tr>
79
  <p class="pa-maps-api-notice">
80
+ <?php echo esc_html( Helper_Functions::get_prefix() ) . __(' Maps Element requires Google API key to be entered below. If you don’t have one, click ', 'premium-addons-for-elementor'); ?><a href="https://developers.google.com/maps/documentation/javascript/get-api-key" target="_blank"><?php echo __('here', 'premium-addons-for-elementor'); ?></a><?php echo __(' to get your key.', 'premium-addons-for-elementor'); ?>
81
  </p>
82
  </tr>
83
  <tr>
84
+ <td>
85
+ <h4 class="pa-api-title"><?php echo __('Google Maps API Key:', 'premium-addons-for-elementor'); ?></h4>
86
+ </td>
87
+ <td>
88
+ <input name="premium-map-api" id="premium-map-api" type="text" placeholder="API Key" value="<?php echo $this->pa_maps_get_settings['premium-map-api']; ?>">
89
+ </td>
90
+ </tr>
91
+ <tr>
92
+ <td>
93
+ <h4 class="pa-api-disable-title"><?php echo __('Load Maps API JS File:','premium-addons-for-elementor'); ?></h4>
94
+ </td>
95
+ <td>
96
+ <input name="premium-map-disable-api" id="premium-map-disable-api" type="checkbox" <?php checked(1, $this->pa_maps_get_settings['premium-map-disable-api'], true) ?>><span><?php echo __('This will load API JS file if it\'s not loaded by another theme or plugin', 'premium-addons-for-elementor'); ?></span>
97
+ </td>
98
  </tr>
99
  <tr>
100
+ <td>
101
+ <h4 class="pa-api-disable-title"><?php echo __('Load Markers Clustering JS File:','premium-addons-for-elementor'); ?></h4>
102
+ </td>
103
+ <td>
104
+ <input name="premium-map-cluster" id="premium-map-cluster" type="checkbox" <?php checked(1, $this->pa_maps_get_settings['premium-map-cluster'], true) ?>><span><?php echo __('This will load the JS file for markers clusters', 'premium-addons-for-elementor'); ?></span>
105
+ </td>
106
  </tr>
107
  </table>
108
  <input type="submit" value="<?php echo __('Save Settings', 'premium-addons-for-elementor'); ?>" class="button pa-btn pa-save-button">
141
 
142
  $this->pa_maps_settings = array(
143
  'premium-map-api' => $settings['premium-map-api'],
144
+ 'premium-map-disable-api' => intval( $settings['premium-map-disable-api'] ? 1 : 0 ),
145
+ 'premium-map-cluster' => intval( $settings['premium-map-cluster'] ? 1 : 0 )
146
  );
147
 
148
  update_option( 'pa_maps_save_settings', $this->pa_maps_settings );
admin/settings/version-control.php CHANGED
@@ -85,7 +85,7 @@ class PA_Version_Control {
85
  <tr class="pa-roll-row">
86
  <th>Rollback Version</th>
87
  <td>
88
- <div><?php echo sprintf( '<a target="_blank" href="%1$s" class="button pa-btn pa-rollback-button elementor-button-spinner">%2$s</a>', wp_nonce_url( admin_url( 'admin-post.php?action=premium_addons_rollback' ), 'premium_addons_rollback' ), __('Reinstall Version 3.3.3', 'premium-addons-for-elementor') ); ?></div>
89
  <p class="pa-roll-desc">
90
  <span><?php echo __('Warning: Please backup your database before making the rollback.', 'premium-addons-for-elementor'); ?></span>
91
  </p>
85
  <tr class="pa-roll-row">
86
  <th>Rollback Version</th>
87
  <td>
88
+ <div><?php echo sprintf( '<a target="_blank" href="%1$s" class="button pa-btn pa-rollback-button elementor-button-spinner">%2$s</a>', wp_nonce_url( admin_url( 'admin-post.php?action=premium_addons_rollback' ), 'premium_addons_rollback' ), __('Reinstall Version 3.3.4', 'premium-addons-for-elementor') ); ?></div>
89
  <p class="pa-roll-desc">
90
  <span><?php echo __('Warning: Please backup your database before making the rollback.', 'premium-addons-for-elementor'); ?></span>
91
  </p>
includes/class-addons-integration.php CHANGED
@@ -31,7 +31,7 @@ class Premium_Addons_Integration {
31
 
32
  add_action( 'elementor/frontend/after_register_scripts', array( $this, 'register_frontend_scripts' ) );
33
 
34
- add_action( 'wp_enqueue_scripts', array( $this, 'premium_maps_required_script' ) );
35
 
36
 
37
  add_action( 'wp_ajax_get_elementor_template_content', array( $this, 'get_template_content' ) );
@@ -78,11 +78,13 @@ class Premium_Addons_Integration {
78
 
79
  }
80
 
81
- /**
82
- * Enqueue Preview CSS files
83
- * @since 2.9.0
84
- * @access public
85
- */
 
 
86
  public function enqueue_preview_styles() {
87
 
88
  wp_enqueue_style('pa-prettyphoto');
@@ -90,10 +92,11 @@ class Premium_Addons_Integration {
90
  }
91
 
92
  /**
93
- * Enqueue Widgets` CSS file
94
- * @since 2.9.0
95
- * @access public
96
- */
 
97
  public function enqueue_frontend_styles() {
98
 
99
  wp_enqueue_style(
@@ -106,21 +109,26 @@ class Premium_Addons_Integration {
106
 
107
  }
108
 
109
- /** Load widgets require function
110
- * @since 1.0.0
111
- * @access public
112
- */
 
 
 
113
  public function widgets_area() {
114
  $this->widgets_register();
115
  }
116
 
117
- /** Requires widgets files
118
- * @since 1.0.0
119
- * @access private
120
- */
 
 
121
  private function widgets_register() {
122
 
123
- $check_component_active = PA_admin_settings::get_enabled_keys();
124
 
125
  foreach ( glob( PREMIUM_ADDONS_PATH . 'widgets/' . '*.php' ) as $file ) {
126
 
@@ -135,13 +143,15 @@ class Premium_Addons_Integration {
135
 
136
  }
137
 
138
- /** Registers required JS files
139
- * @since 1.0.0
140
- * @access public
 
 
141
  */
142
  public function register_frontend_scripts() {
143
 
144
- $premium_maps_api = PA_Gomaps::get_enabled_keys()['premium-map-api'];
145
 
146
  wp_register_script(
147
  'premium-addons-js',
@@ -197,18 +207,21 @@ class Premium_Addons_Integration {
197
  PREMIUM_ADDONS_VERSION,
198
  true
199
  );
200
-
201
- wp_register_script(
202
- 'google-maps-cluster',
203
- 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/markerclusterer.js',
204
- array(),
205
- PREMIUM_ADDONS_VERSION,
206
- false
207
- );
 
 
 
208
 
209
  wp_register_script(
210
  'premium-maps-api-js',
211
- 'https://maps.googleapis.com/maps/api/js?key=' . $premium_maps_api,
212
  array(),
213
  PREMIUM_ADDONS_VERSION,
214
  false
@@ -241,37 +254,18 @@ class Premium_Addons_Integration {
241
  }
242
 
243
  /*
244
- * Enqueue Premium Maps API script
245
- */
246
- public function premium_maps_required_script() {
247
-
248
- $premium_maps_api = PA_Gomaps::get_enabled_keys()['premium-map-api'];
249
-
250
- $premium_maps_disable_api = PA_Gomaps::get_enabled_keys()['premium-map-disable-api'];
251
-
252
- $premium_maps_enabled = PA_admin_settings::get_enabled_keys()['premium-maps'];
253
-
254
- if( $premium_maps_disable_api ) {
255
-
256
- // wp_enqueue_script('premium-maps-api-js', 'https://maps.googleapis.com/maps/api/js?key=' . $premium_maps_api, array(), PREMIUM_ADDONS_VERSION, false);
257
-
258
- }
259
-
260
- if ( $premium_maps_enabled ) {
261
-
262
- /*wp_enqueue_script('google-maps-cluster', 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/markerclusterer.js', array(), PREMIUM_ADDONS_VERSION, false);*/
263
-
264
- }
265
-
266
- }
267
-
268
  public function enqueue_editor_scripts() {
269
 
270
- $premium_maps_api = PA_Gomaps::get_enabled_keys()['premium-map-api'];
271
 
272
- $premium_maps_disable_api = PA_Gomaps::get_enabled_keys()['premium-map-disable-api'];
273
 
274
- $map_enabled = PA_admin_settings::get_enabled_keys()['premium-maps'];
275
 
276
  $premium_maps_enabled = isset( $map_enabled ) ? $map_enabled : 1;
277
 
31
 
32
  add_action( 'elementor/frontend/after_register_scripts', array( $this, 'register_frontend_scripts' ) );
33
 
34
+ //add_action( 'wp_enqueue_scripts', array( $this, 'premium_maps_required_script' ) );
35
 
36
 
37
  add_action( 'wp_ajax_get_elementor_template_content', array( $this, 'get_template_content' ) );
78
 
79
  }
80
 
81
+ /**
82
+ * Enqueue Preview CSS files
83
+ *
84
+ * @since 2.9.0
85
+ * @access public
86
+ *
87
+ */
88
  public function enqueue_preview_styles() {
89
 
90
  wp_enqueue_style('pa-prettyphoto');
92
  }
93
 
94
  /**
95
+ * Enqueue Widgets` CSS file
96
+ *
97
+ * @since 2.9.0
98
+ * @access public
99
+ */
100
  public function enqueue_frontend_styles() {
101
 
102
  wp_enqueue_style(
109
 
110
  }
111
 
112
+ /**
113
+ * Load widgets require function
114
+ *
115
+ * @since 1.0.0
116
+ * @access public
117
+ *
118
+ */
119
  public function widgets_area() {
120
  $this->widgets_register();
121
  }
122
 
123
+ /**
124
+ * Requires widgets files
125
+ *
126
+ * @since 1.0.0
127
+ * @access private
128
+ */
129
  private function widgets_register() {
130
 
131
+ $check_component_active = PA_Elements_Settings::get_enabled_keys();
132
 
133
  foreach ( glob( PREMIUM_ADDONS_PATH . 'widgets/' . '*.php' ) as $file ) {
134
 
143
 
144
  }
145
 
146
+ /**
147
+ * Registers required JS files
148
+ *
149
+ * @since 1.0.0
150
+ * @access public
151
  */
152
  public function register_frontend_scripts() {
153
 
154
+ $maps_settings = PA_Maps::get_enabled_keys();
155
 
156
  wp_register_script(
157
  'premium-addons-js',
207
  PREMIUM_ADDONS_VERSION,
208
  true
209
  );
210
+
211
+ if( $maps_settings['premium-map-cluster'] ) {
212
+ wp_register_script(
213
+ 'google-maps-cluster',
214
+ 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/markerclusterer.js',
215
+ array(),
216
+ PREMIUM_ADDONS_VERSION,
217
+ false
218
+ );
219
+ }
220
+
221
 
222
  wp_register_script(
223
  'premium-maps-api-js',
224
+ 'https://maps.googleapis.com/maps/api/js?key=' . $maps_settings['premium-map-api'],
225
  array(),
226
  PREMIUM_ADDONS_VERSION,
227
  false
254
  }
255
 
256
  /*
257
+ * Enqueue editor scripts
258
+ *
259
+ * @since 3.2.5
260
+ * @access public
261
+ */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
262
  public function enqueue_editor_scripts() {
263
 
264
+ $premium_maps_api = PA_Maps::get_enabled_keys()['premium-map-api'];
265
 
266
+ $premium_maps_disable_api = PA_Maps::get_enabled_keys()['premium-map-disable-api'];
267
 
268
+ $map_enabled = PA_Elements_Settings::get_enabled_keys()['premium-maps'];
269
 
270
  $premium_maps_enabled = isset( $map_enabled ) ? $map_enabled : 1;
271
 
includes/{helper-functions.php → class-helper-functions.php} RENAMED
File without changes
plugin.php CHANGED
@@ -28,10 +28,10 @@ class Plugin {
28
  private function init_components() {
29
 
30
  new PA_About();
31
- new PA_Gomaps();
32
  new PA_Version_Control();
33
  new PA_System_Info();
34
- new PA_admin_settings();
35
  $this->settings = new Pro_Settings();
36
  }
37
 
28
  private function init_components() {
29
 
30
  new PA_About();
31
+ new PA_Maps();
32
  new PA_Version_Control();
33
  new PA_System_Info();
34
+ new PA_Elements_Settings();
35
  $this->settings = new Pro_Settings();
36
  }
37
 
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.3.4
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.3.4');
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.3.3');
23
 
24
  if( ! class_exists('Premium_Addons_Elementor') ) {
25
 
@@ -94,24 +94,27 @@ if( ! class_exists('Premium_Addons_Elementor') ) {
94
  * @return void
95
  */
96
  public function init_files() {
 
97
  if ( is_admin() ) {
98
- require_once (PREMIUM_ADDONS_PATH . 'includes/system-info.php');
99
- require_once (PREMIUM_ADDONS_PATH . 'includes/maintenance.php');
100
- require_once (PREMIUM_ADDONS_PATH . 'includes/rollback.php');
101
- require_once (PREMIUM_ADDONS_PATH . 'includes/class-beta-testers.php');
102
- require_once (PREMIUM_ADDONS_PATH . 'plugin.php');
103
- require_once (PREMIUM_ADDONS_PATH . 'admin/includes/notices.php' );
104
- require_once (PREMIUM_ADDONS_PATH . 'admin/settings/about.php');
105
- require_once (PREMIUM_ADDONS_PATH . 'admin/settings/version-control.php');
106
- require_once (PREMIUM_ADDONS_PATH . 'admin/settings/sys-info.php');
107
- require_once (PREMIUM_ADDONS_PATH . 'admin/settings/gopro.php');
 
108
  $beta_testers = new Premium_Beta_Testers();
 
109
  }
110
 
111
- require_once (PREMIUM_ADDONS_PATH . 'includes/helper-functions.php');
112
- require_once (PREMIUM_ADDONS_PATH . 'admin/settings/gomaps.php');
113
- require_once (PREMIUM_ADDONS_PATH . 'admin/settings/elements.php');
114
- require_once (PREMIUM_ADDONS_PATH . 'includes/elementor-helper.php');
115
 
116
  }
117
 
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.3.5
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.3.5');
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.3.4');
23
 
24
  if( ! class_exists('Premium_Addons_Elementor') ) {
25
 
94
  * @return void
95
  */
96
  public function init_files() {
97
+
98
  if ( is_admin() ) {
99
+
100
+ require_once ( PREMIUM_ADDONS_PATH . 'includes/system-info.php');
101
+ require_once ( PREMIUM_ADDONS_PATH . 'includes/maintenance.php');
102
+ require_once ( PREMIUM_ADDONS_PATH . 'includes/rollback.php');
103
+ require_once ( PREMIUM_ADDONS_PATH . 'includes/class-beta-testers.php');
104
+ require_once ( PREMIUM_ADDONS_PATH . 'plugin.php');
105
+ require_once ( PREMIUM_ADDONS_PATH . 'admin/includes/notices.php' );
106
+ require_once ( PREMIUM_ADDONS_PATH . 'admin/settings/about.php');
107
+ require_once ( PREMIUM_ADDONS_PATH . 'admin/settings/version-control.php');
108
+ require_once ( PREMIUM_ADDONS_PATH . 'admin/settings/sys-info.php');
109
+ require_once ( PREMIUM_ADDONS_PATH . 'admin/settings/gopro.php');
110
  $beta_testers = new Premium_Beta_Testers();
111
+
112
  }
113
 
114
+ require_once ( PREMIUM_ADDONS_PATH . 'includes/class-helper-functions.php' );
115
+ require_once ( PREMIUM_ADDONS_PATH . 'admin/settings/maps.php' );
116
+ require_once ( PREMIUM_ADDONS_PATH . 'admin/settings/elements.php' );
117
+ require_once ( PREMIUM_ADDONS_PATH . 'includes/elementor-helper.php' );
118
 
119
  }
120
 
queries.php CHANGED
@@ -43,29 +43,29 @@ function premium_blog_get_post_settings( $settings ) {
43
  return $post_args;
44
  }
45
 
46
- function premium_addons_get_excerpt_by_id( $post_id, $excerpt_length, $excerpt_type, $exceprt_text ) {
47
 
48
  $the_post = get_post( $post_id );
49
 
50
  $the_excerpt = null;
51
 
52
  if ( $the_post ) {
53
- $the_excerpt = $the_post->post_content;
54
  }
55
 
56
- $the_excerpt = strip_tags( strip_shortcodes( $the_excerpt ) ); //Strips tags and images
57
 
58
  $words = explode( ' ', $the_excerpt, $excerpt_length + 1 );
59
 
60
- if(count( $words ) > $excerpt_length ) :
61
  array_pop( $words );
62
  if( 'dots' == $excerpt_type ) {
63
- array_push($words, '…');
64
  } else {
65
- array_push($words, ' <a href="' . get_permalink($post_id) .'" class="premium-blog-excerpt-link">' . $exceprt_text . '</a>');
66
  }
67
 
68
- $the_excerpt = implode(' ', $words);
69
  endif;
70
 
71
  return $the_excerpt;
43
  return $post_args;
44
  }
45
 
46
+ function premium_addons_get_excerpt_by_id( $post_id, $excerpt_length, $excerpt_type, $exceprt_text, $excerpt_src ) {
47
 
48
  $the_post = get_post( $post_id );
49
 
50
  $the_excerpt = null;
51
 
52
  if ( $the_post ) {
53
+ $the_excerpt = ( $excerpt_src ) ? $the_post->post_content : $the_post->post_excerpt;
54
  }
55
 
56
+ $the_excerpt = strip_tags( strip_shortcodes( $the_excerpt ) );
57
 
58
  $words = explode( ' ', $the_excerpt, $excerpt_length + 1 );
59
 
60
+ if( count( $words ) > $excerpt_length ) :
61
  array_pop( $words );
62
  if( 'dots' == $excerpt_type ) {
63
+ array_push( $words, '…' );
64
  } else {
65
+ array_push( $words, ' <a href="' . get_permalink( $post_id ) .'" class="premium-blog-excerpt-link">' . $exceprt_text . '</a>' );
66
  }
67
 
68
+ $the_excerpt = implode( ' ', $words );
69
  endif;
70
 
71
  return $the_excerpt;
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: http://premiumaddons.com
5
  Requires at least: 4.5
6
  Tested up to: 5.1.1
7
  Requires PHP: 5.4
8
- Stable tag: 3.3.4
9
  License: GPL v3.0
10
  License URI: https://opensource.org/licenses/GPL-3.0
11
 
@@ -139,6 +139,12 @@ Premium Addons for Elementor is 100% Ads Free, Ads can only be detected from You
139
 
140
  == Changelog ==
141
 
 
 
 
 
 
 
142
  = 3.3.4 =
143
 
144
  - Fixed: `markercluster.js` file is loaded even when Maps widget not on the page.
5
  Requires at least: 4.5
6
  Tested up to: 5.1.1
7
  Requires PHP: 5.4
8
+ Stable tag: 3.3.5
9
  License: GPL v3.0
10
  License URI: https://opensource.org/licenses/GPL-3.0
11
 
139
 
140
  == Changelog ==
141
 
142
+ = 3.3.5 =
143
+
144
+ - Tweak: Added `Load Markers Clustering JS File` option to admin Google Maps API page.
145
+ - Tweak: Added `Pull Excerpt From Content Box` option in Blog widget.
146
+ - Tweak: Separate Excerpt link style options from meta tab in Blog widget.
147
+
148
  = 3.3.4 =
149
 
150
  - Fixed: `markercluster.js` file is loaded even when Maps widget not on the page.
widgets/premium-blog.php CHANGED
@@ -263,6 +263,15 @@ class Premium_Blog extends Widget_Base {
263
  'default' => 'yes',
264
  ]
265
  );
 
 
 
 
 
 
 
 
 
266
 
267
  $this->add_control('premium_blog_excerpt_length',
268
  [
@@ -747,7 +756,7 @@ class Premium_Blog extends Widget_Base {
747
  'value' => Scheme_Color::COLOR_2,
748
  ],
749
  'selectors' => [
750
- '{{WRAPPER}} .premium-blog-entry-meta, {{WRAPPER}} .premium-blog-entry-meta a, {{WRAPPER}} .premium-blog-post-content .premium-blog-excerpt-link' => 'color: {{VALUE}};',
751
  ]
752
  ]
753
  );
@@ -757,7 +766,7 @@ class Premium_Blog extends Widget_Base {
757
  Group_Control_Typography::get_type(),
758
  [
759
  'name' => 'premium_blog_meta_typo',
760
- 'selector' => '{{WRAPPER}} .premium-blog-entry-meta a,{{WRAPPER}} .premium-blog-post-content .premium-blog-excerpt-link',
761
  ]
762
  );
763
 
@@ -770,7 +779,7 @@ class Premium_Blog extends Widget_Base {
770
  'value' => Scheme_Color::COLOR_1,
771
  ],
772
  'selectors' => [
773
- '{{WRAPPER}} .premium-blog-entry-meta a:hover, {{WRAPPER}} .premium-blog-post-content .premium-blog-excerpt-link:hover' => 'color: {{VALUE}};',
774
  ]
775
  ]
776
  );
@@ -1170,6 +1179,45 @@ class Premium_Blog extends Widget_Base {
1170
  ]
1171
  );
1172
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1173
  $this->end_controls_section();
1174
 
1175
  }
@@ -1180,9 +1228,10 @@ class Premium_Blog extends Widget_Base {
1180
 
1181
  $excerpt_type = $settings['premium_blog_excerpt_type'];
1182
  $excerpt_text = $settings['premium_blog_excerpt_text'];
 
1183
 
1184
  if ( $settings['premium_blog_excerpt'] === 'yes' ) {
1185
- echo premium_addons_get_excerpt_by_id( get_the_ID(), $settings['premium_blog_excerpt_length'], $excerpt_type, $excerpt_text );
1186
  } else {
1187
  the_content();
1188
  }
@@ -1241,6 +1290,7 @@ class Premium_Blog extends Widget_Base {
1241
  $date_format = get_option('date_format');
1242
 
1243
  $this->add_render_attribute( 'title', 'class', 'premium-blog-entry-title' );
 
1244
  ?>
1245
 
1246
  <div class="premium-blog-post-container">
263
  'default' => 'yes',
264
  ]
265
  );
266
+
267
+ $this->add_control('premium_blog_excerpt_box',
268
+ [
269
+ 'label' => __('Pull From Content Box', 'premium-addons-for-elementor'),
270
+ 'type' => Controls_Manager::SWITCHER,
271
+ 'description' => __('Post content will be pulled from post content box','premium-addons-for-elementor'),
272
+ 'return_value' => 'true',
273
+ ]
274
+ );
275
 
276
  $this->add_control('premium_blog_excerpt_length',
277
  [
756
  'value' => Scheme_Color::COLOR_2,
757
  ],
758
  'selectors' => [
759
+ '{{WRAPPER}} .premium-blog-entry-meta, {{WRAPPER}} .premium-blog-entry-meta a' => 'color: {{VALUE}};',
760
  ]
761
  ]
762
  );
766
  Group_Control_Typography::get_type(),
767
  [
768
  'name' => 'premium_blog_meta_typo',
769
+ 'selector' => '{{WRAPPER}} .premium-blog-entry-meta a',
770
  ]
771
  );
772
 
779
  'value' => Scheme_Color::COLOR_1,
780
  ],
781
  'selectors' => [
782
+ '{{WRAPPER}} .premium-blog-entry-meta a:hover' => 'color: {{VALUE}};',
783
  ]
784
  ]
785
  );
1179
  ]
1180
  );
1181
 
1182
+ $this->end_controls_section();
1183
+
1184
+ $this->start_controls_section('premium_blog_read_more_style',
1185
+ [
1186
+ 'label' => __('Read More Text', 'premium-addons-for-elementor'),
1187
+ 'tab' => Controls_Manager::TAB_STYLE,
1188
+ ]
1189
+ );
1190
+
1191
+ $this->add_control('premium_blog_read_more_color',
1192
+ [
1193
+ 'label' => __('Color', 'premium-addons-for-elementor'),
1194
+ 'type' => Controls_Manager::COLOR,
1195
+ 'selectors' => [
1196
+ '{{WRAPPER}} .premium-blog-post-content .premium-blog-excerpt-link' => 'color: {{VALUE}};',
1197
+ ]
1198
+ ]
1199
+ );
1200
+
1201
+ $this->add_control('premium_blog_read_more_hover_color',
1202
+ [
1203
+ 'label' => __('Hover Color', 'premium-addons-for-elementor'),
1204
+ 'type' => Controls_Manager::COLOR,
1205
+ 'selectors' => [
1206
+ '{{WRAPPER}} .premium-blog-post-content .premium-blog-excerpt-link:hover' => 'color: {{VALUE}};',
1207
+ ]
1208
+ ]
1209
+ );
1210
+
1211
+ $this->add_group_control(
1212
+ Group_Control_Typography::get_type(),
1213
+ [
1214
+ 'name' => 'premium_blog_read_more_typo',
1215
+ 'selector' => '{{WRAPPER}} .premium-blog-post-content .premium-blog-excerpt-link',
1216
+ ]
1217
+ );
1218
+
1219
+
1220
+
1221
  $this->end_controls_section();
1222
 
1223
  }
1228
 
1229
  $excerpt_type = $settings['premium_blog_excerpt_type'];
1230
  $excerpt_text = $settings['premium_blog_excerpt_text'];
1231
+ $excerpt_src = $settings['premium_blog_excerpt_box'];
1232
 
1233
  if ( $settings['premium_blog_excerpt'] === 'yes' ) {
1234
+ echo premium_addons_get_excerpt_by_id( get_the_ID(), $settings['premium_blog_excerpt_length'], $excerpt_type, $excerpt_text, $excerpt_src );
1235
  } else {
1236
  the_content();
1237
  }
1290
  $date_format = get_option('date_format');
1291
 
1292
  $this->add_render_attribute( 'title', 'class', 'premium-blog-entry-title' );
1293
+
1294
  ?>
1295
 
1296
  <div class="premium-blog-post-container">
widgets/premium-maps.php CHANGED
@@ -10,8 +10,7 @@ class Premium_Maps extends Widget_Base {
10
  return 'premium-addon-maps';
11
  }
12
 
13
- public function is_reload_preview_required()
14
- {
15
  return true;
16
  }
17
 
@@ -46,9 +45,9 @@ class Premium_Maps extends Widget_Base {
46
  ]
47
  );
48
 
49
- $map_api = get_option( 'pa_maps_save_settings' )['premium-map-api'];
50
 
51
- if( ! isset( $map_api ) || empty( $map_api ) ){
52
  $this->add_control('premium_maps_api_url',
53
  [
54
  '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>',
@@ -332,12 +331,15 @@ class Premium_Maps extends Widget_Base {
332
  ]
333
  );
334
 
335
- $this->add_control('premium_maps_map_option_cluster',
 
336
  [
337
  'label' => __( 'Marker Clustering', 'premium-addons-for-elementor' ),
338
  'type' => Controls_Manager::SWITCHER,
339
  ]
340
- );
 
 
341
 
342
  $this->end_controls_section();
343
 
@@ -615,8 +617,14 @@ class Premium_Maps extends Widget_Base {
615
 
616
  $hover_close = 'yes' == $settings['premium_maps_marker_mouse_out'] ? 'true' : 'false';
617
 
618
- $marker_cluster = 'yes' == $settings['premium_maps_map_option_cluster'] ? 'true' : 'false';
619
-
 
 
 
 
 
 
620
  $centerlat = !empty($settings['premium_maps_center_lat']) ? $settings['premium_maps_center_lat'] : 18.591212;
621
 
622
  $centerlong = !empty($settings['premium_maps_center_long']) ? $settings['premium_maps_center_long'] : 73.741261;
10
  return 'premium-addon-maps';
11
  }
12
 
13
+ public function is_reload_preview_required() {
 
14
  return true;
15
  }
16
 
45
  ]
46
  );
47
 
48
+ $settings = \PremiumAddons\PA_Maps::get_enabled_keys();
49
 
50
+ if( empty( $settings['premium-map-api'] ) ) {
51
  $this->add_control('premium_maps_api_url',
52
  [
53
  '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>',
331
  ]
332
  );
333
 
334
+ if( $settings['premium-map-cluster'] ) {
335
+ $this->add_control('premium_maps_map_option_cluster',
336
  [
337
  'label' => __( 'Marker Clustering', 'premium-addons-for-elementor' ),
338
  'type' => Controls_Manager::SWITCHER,
339
  ]
340
+ );
341
+ }
342
+
343
 
344
  $this->end_controls_section();
345
 
617
 
618
  $hover_close = 'yes' == $settings['premium_maps_marker_mouse_out'] ? 'true' : 'false';
619
 
620
+ $marker_cluster = false;
621
+
622
+ $is_cluster_enabled = \PremiumAddons\PA_Maps::get_enabled_keys()['premium-map-cluster'];
623
+
624
+ if( $is_cluster_enabled ) {
625
+ $marker_cluster = 'yes' == $settings['premium_maps_map_option_cluster'] ? 'true' : 'false';
626
+ }
627
+
628
  $centerlat = !empty($settings['premium_maps_center_lat']) ? $settings['premium_maps_center_lat'] : 18.591212;
629
 
630
  $centerlong = !empty($settings['premium_maps_center_long']) ? $settings['premium_maps_center_long'] : 73.741261;